Created
February 22, 2018 20:35
-
-
Save anasnakawa/165d6b98a4146bb00064d6e09fab6425 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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