-
-
Save molotow11/c8c33e7d5320094757f01c60c5548ce8 to your computer and use it in GitHub Desktop.
Revisions
-
molotow11 revised this gist
Feb 15, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ var scriptsLoadDelay = 10000; var delayedScripts = [ "https://w.sharethis.com/button/buttons.js", ]; -
molotow11 created this gist
Feb 15, 2021 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ var scriptsLoadDelay = 10000; var delayedScripts = [ "https://w.sharethis.com/button/buttons.js", ]; setTimeout(function() { console.log("Delayed scripts loading"); for(var i=0; i<delayedScripts.length; i++) { var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true; script.src = delayedScripts[i]; console.log("Delayed: " + delayedScripts[i]); var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s); } }, scriptsLoadDelay);