Skip to content

Commit

Permalink
Fixenate
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenny2github committed Jan 24, 2019
1 parent f1d14c0 commit 37c8a74
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions run_scratchblocks4.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var scratchblocks_rendered = false;
function run_scratchblocks() {
if (scratchblocks_rendered) {
window.removeEventListener('focus', run_scratchblocks);
window.removeEventListener('load', run_scratchblocks);
return;
}
scratchblocks.renderMatching('pre.blocks', {languages: ['en'].concat(mw.config.get('wgScratchBlocks4Langs')), style: 'scratch3'});
Expand All @@ -21,6 +22,7 @@ function run_scratchblocks() {
}
scratchblocks_rendered = true;
window.removeEventListener('focus', run_scratchblocks);
window.removeEventListener('load', run_scratchblocks);
}
window.addEventListener('focus', run_scratchblocks);
window.addEventListener('load', run_scratchblocks);

0 comments on commit 37c8a74

Please sign in to comment.