Last active
September 29, 2021 06:48
Revisions
-
jonathanstark revised this gist
Feb 20, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains 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 @@ -15,11 +15,11 @@ doc.body.appendChild(scriptTag); } } var goodBrowser = function() { // Return true if browser passes all feature tests return true; } if(goodBrowser()) { appendScripts([ './js/script1.js', './js/script2.js' -
jonathanstark revised this gist
Feb 20, 2013 . 1 changed file with 10 additions and 10 deletions.There are no files selected for viewing
This file contains 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 @@ -6,26 +6,26 @@ <!-- Append javascript programatically so we don't make needless http requests --> <script> (function(doc){ var appendScripts = function(srcs) { if (src = srcs.shift()) { var scriptTag = doc.createElement('SCRIPT'); scriptTag.src = src; scriptTag.onload = function(){appendScripts(srcs)}; doc.body.appendChild(scriptTag); } } var awesomeBrowser = function() { // Return true if browser passes all feature tests return true; } if(awesomeBrowser()) { appendScripts([ './js/script1.js', './js/script2.js' ]); } })(document); </script> </body> </html> -
jonathanstark revised this gist
Feb 20, 2013 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains 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 @@ -7,20 +7,20 @@ <!-- Append javascript programatically so we don't make needless http requests --> <script> (function(){ var appendScripts = function(srcs) { if (srcs.length > 0) { var scriptTag = document.createElement('SCRIPT'); scriptTag.src = srcs.shift(); scriptTag.onload = function(){appendScripts(srcs)}; document.body.appendChild(scriptTag); } } var lameBrowser = function() { // Do checks and return true if browser is lame return false; } if(!lameBrowser()) { appendScripts([ './js/script1.js', './js/script2.js' ]); -
jonathanstark renamed this gist
Feb 15, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
jonathanstark created this gist
Feb 15, 2013 .There are no files selected for viewing
This file contains 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,31 @@ <html> <head></head> <body> <!-- All your kewl content goes here --> <!-- Append javascript programatically so we don't make needless http requests --> <script> (function(){ var append_scripts = function(srcs) { if (srcs.length > 0) { var script_tag = document.createElement('SCRIPT'); script_tag.src = srcs.shift(); script_tag.onload = function(){append_scripts(srcs)}; document.body.appendChild(script_tag); } } var lame_browser = function() { // Do checks and return true if browser is lame return false; } if(!lame_browser()) { append_scripts([ './js/script1.js', './js/script2.js' ]); } })(); </script> </body> </html>