Skip to content

Instantly share code, notes, and snippets.

@molotow11
Created February 15, 2021 10:37
Show Gist options
  • Select an option

  • Save molotow11/c8c33e7d5320094757f01c60c5548ce8 to your computer and use it in GitHub Desktop.

Select an option

Save molotow11/c8c33e7d5320094757f01c60c5548ce8 to your computer and use it in GitHub Desktop.

Revisions

  1. molotow11 revised this gist Feb 15, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .js
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    var scriptsLoadDelay = 10000;
    var scriptsLoadDelay = 10000;
    var delayedScripts = [
    "https://w.sharethis.com/button/buttons.js",
    ];
  2. molotow11 created this gist Feb 15, 2021.
    16 changes: 16 additions & 0 deletions .js
    Original 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);