Skip to content

Instantly share code, notes, and snippets.

@CoolS2
Created May 14, 2019 19:00
Show Gist options
  • Select an option

  • Save CoolS2/05b5545fb9f966a3560e1313f7d0cec9 to your computer and use it in GitHub Desktop.

Select an option

Save CoolS2/05b5545fb9f966a3560e1313f7d0cec9 to your computer and use it in GitHub Desktop.
Wait for file load JS
function when_external_loaded (callback) {
if (typeof videoOptions === 'undefined') {
setTimeout (function () {
when_external_loaded (callback);
}, 500); // wait 100 ms
} else { callback (); }
}
when_external_loaded (function () {
setTimeout(videoOptions(ads, device, startTime, intervalTime, muteTab), 500);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment