Created
October 15, 2018 15:34
-
-
Save anasnakawa/ddc0f2db2f05f2b73ea2a8c3e16e49be to your computer and use it in GitHub Desktop.
This file contains hidden or 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() { | |
/** | |
* hook method to be executed as soon as shortpoint | |
* rendered on the page | |
*/ | |
function ShortPointReady() { | |
shortpoint.$('#openMe').click(); | |
}; | |
// 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