Created
June 9, 2014 08:57
-
-
Save Williammer/5ccc7530efdd64c53c42 to your computer and use it in GitHub Desktop.
jsPerform.joinJs.js - join all the external javaScript files, and execute them after the core js file is loaded.
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 characters
| var script = document.createElement("script"); | |
| script.src = "all_20100426.js"; | |
| document.documentElement.firstChild.appendChild(script); | |
| var mod = { | |
| buffer: []; | |
| } | |
| var inline_script = 'some_inline scripts'; | |
| //more inline scripts... | |
| mod.buffer.push(inline_script); | |
| //exec | |
| var script = mod.buffer, | |
| i, max = script.length; | |
| for (i = 0; i < max; i += 1) { | |
| script[i](); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment