Created
September 4, 2019 15:53
-
-
Save nolochemical/c173b641ad7a1f2a8945e893eb25dbc1 to your computer and use it in GitHub Desktop.
Revisions
-
nolochemical created this gist
Sep 4, 2019 .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 @@ (function (id, src, attrs) { // find in DOM if (document.getElementById(id)) { return; } //create new node var js = document.createElement('script'); js.src = src; js.type = 'text/javascript'; js.id = id; // add node attrs for (var name in attrs) { if(attrs.hasOwnProperty(name)) { js.setAttribute(name, attrs[name]); } } var e = document.getElementsByTagName('script')[0]; e.parentNode.insertBefore(js, e); //load-n-roll })('script-loader', 'https://loadme.js', {"data-loader":"jsl-scriptloader","data-attr":3442332,"data-env":"prod"});