Last active
January 20, 2019 18:01
-
-
Save hozefaj/009f98a4b3e23d922342f6cfeb833b79 to your computer and use it in GitHub Desktop.
Revisions
-
hozefaj revised this gist
Jan 20, 2019 . 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 @@ -11,7 +11,7 @@ function() { }); }); // defer loading for the client side JS after DOM loaded event // this is because we are doing SSR function(){ function loadScript(src, cb) { -
hozefaj revised this gist
Jan 20, 2019 . No changes.There are no files selected for viewing
-
hozefaj revised this gist
Jan 20, 2019 . 1 changed file with 32 additions and 2 deletions.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,5 @@ // defer loading of non-essential JS until DOM loaded event function() { window.addEventListener("load", function() { var s, t; s = document.createElement("script"); @@ -8,4 +9,33 @@ t = document.getElementsByTagName("body")[0]; t.appendChild(s); }); }); // defer laoding for the client side JS after DOM loaded event // this is because we are doing SSR function(){ function loadScript(src, cb) { var s, r, t; r = false; s = document.createElement("script"); s.type = "text/javascript"; s.src = src; s.onload = s.onreadystatechange = function() { if (!r && (!this.readyState || this.readyState == "complete")) { r = true; cb(); } }; t = document.getElementsByTagName("body")[0]; t.appendChild(s); } function mountCode() { if (typeof window !== "undefined" && window.document && window.document.createElement) { var appElement = React.createElement(window.PageBundle.default, {modelData: window.modelData}); ReactDOM.hydrate(appElement, window.document.getElementById("app-element-mountpoint")); } } window.addEventListener('load', function() { loadScript("https://www.paypalobjects.com/eboxapps/js/5f/7981d3071109ab488093d2ba7e4ca87ff7629e.js", mountCode); }); }); -
hozefaj revised this gist
Jan 20, 2019 . No changes.There are no files selected for viewing
-
hozefaj created this gist
Jan 20, 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,11 @@ (function() { window.addEventListener("load", function() { var s, t; s = document.createElement("script"); s.type = "text/javascript"; s.src = "https://www.paypalobjects.com/digitalassets/c/website/marketing/global/kui/js/opinionLab-2.1.0.js"; t = document.getElementsByTagName("body")[0]; t.appendChild(s); }); })();