small cleanup
This commit is contained in:
+2
-1
@@ -1,8 +1,10 @@
|
|||||||
|
|
||||||
function load_script(o_script, callback) {
|
function load_script(o_script, callback) {
|
||||||
|
|
||||||
let script = document.createElement('script');
|
let script = document.createElement('script');
|
||||||
script.type = o_script.type || 'text/javascript';
|
script.type = o_script.type || 'text/javascript';
|
||||||
|
|
||||||
|
|
||||||
if(o_script.hasAttribute('src')) {
|
if(o_script.hasAttribute('src')) {
|
||||||
script.src = o_script.src;
|
script.src = o_script.src;
|
||||||
script.onload = callback
|
script.onload = callback
|
||||||
@@ -23,7 +25,6 @@ var next_script_index = 0
|
|||||||
var deferred_scripts = []
|
var deferred_scripts = []
|
||||||
|
|
||||||
function load_next_deferred_script() {
|
function load_next_deferred_script() {
|
||||||
console.log("recurse!")
|
|
||||||
if (next_script_index >= deferred_scripts.length)
|
if (next_script_index >= deferred_scripts.length)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user