Skip to content

Instantly share code, notes, and snippets.

@JJTech0130
Last active November 24, 2020 20:24
Show Gist options
  • Save JJTech0130/ac0f4e7308af7f2f37b6074935da2906 to your computer and use it in GitHub Desktop.
Save JJTech0130/ac0f4e7308af7f2f37b6074935da2906 to your computer and use it in GitHub Desktop.
Workaround for a bug in VidCode (https://www.vidcode.com/)
/*
* Really nasty code to make sure the 'run_once' is only run once.
* JSHint (the VidCode linter) hates it, so I turned it off.
*
* VidCode has this weird quirk where it will run everything
* multiple times in a quick succession, and sharing the variables
* between sessions. This is the only way to make the timers work right.
*/
/* jshint ignore:start */
if (typeof executed == 'undefined') {
var executed = true;
run_once();
}
/* jshint ignore:end */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment