소스 검색

small cleanup

main
Felix Brendel 5 년 전
부모
커밋
379d150dbb
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. +3
    -2
      decipher.js

+ 3
- 2
decipher.js 파일 보기

@@ -1,8 +1,10 @@

function load_script(o_script, callback) {

let script = document.createElement('script');
script.type = o_script.type || 'text/javascript';


if(o_script.hasAttribute('src')) {
script.src = o_script.src;
script.onload = callback
@@ -11,7 +13,7 @@ function load_script(o_script, callback) {
script.innerHTML = o_script.innerHTML;
document.head.appendChild(script);

if(o_script.src === "") {
if (o_script.src === "") {
// NOTE(Felix): it seems the onload is not called on script nodes that
// define the js inline instead of through a src attribute, so for
// them we call the callback manually and hope for the best.
@@ -23,7 +25,6 @@ var next_script_index = 0
var deferred_scripts = []

function load_next_deferred_script() {
console.log("recurse!")
if (next_script_index >= deferred_scripts.length)
return



불러오는 중...
취소
저장