Skip to content

Instantly share code, notes, and snippets.

@anasnakawa
Created February 22, 2018 20:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anasnakawa/165d6b98a4146bb00064d6e09fab6425 to your computer and use it in GitHub Desktop.
Save anasnakawa/165d6b98a4146bb00064d6e09fab6425 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
(function() {
'use strict';
/**
* hook method to be executed as soon as shortpoint
* rendered on the page
*/
function ShortPointReady() {
// put your code here
// you can use these libraries as well
// var $ = shortpoint.base.libs.$; // jQuery
// var _ = shortpoint.base.libs._; // Underscore
// var moment = shortpoint.base.libs.moment; // Moment.js
};
// shortpoint not yet available in the page
// wait for shortpoint render dom event
document.addEventListener( 'shortpoint-render-above-fold', function() {
// exit on edit mode
if( window.shortPointInserter ) {
return;
}
setTimeout( ShortPointReady , 500);
});
})();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment