Skip to content

Instantly share code, notes, and snippets.

@bozdoz
Created March 8, 2021 04:46
Show Gist options
  • Save bozdoz/44619c1dade0fd36d420422a231e79f7 to your computer and use it in GitHub Desktop.
Save bozdoz/44619c1dade0fd36d420422a231e79f7 to your computer and use it in GitHub Desktop.
Masterpiece JS
var readyToGo;
function prep_load () {
var enclosed,
data = 'function setSavedScenario () {' +
'return function () {' +
'readyToGo = function () {' +
'window.setTimeout(function () {' +
// this is just to show that the code "works"
'document.body.className = "blue";' +
'}, 650);' +
'};' +
'readyToGo();' +
'return readyToGo;' +
'}' +
'}';
eval(data);
enclosed = setSavedScenario();
if (typeof(enclosed) == 'function') {
readyToGo = enclosed();
enclosed();
}
if (typeof(readyToGo) !== 'undefined') {
readyToGo();
readyToGo = undefined;
}
}
prep_load();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment