|
|
@ -60,7 +60,8 @@ function loadJs(window, jsText) { |
|
|
|
let js = ''; |
|
|
|
let js = ''; |
|
|
|
// 加载 页面上的js
|
|
|
|
// 加载 页面上的js
|
|
|
|
const allScript = window.document.querySelectorAll('script[r="m"]'); |
|
|
|
const allScript = window.document.querySelectorAll('script[r="m"]'); |
|
|
|
allScript.forEach(script => { |
|
|
|
for (let i = 0; i < allScript.length; i++) { |
|
|
|
|
|
|
|
const script = allScript[i]; |
|
|
|
let attr = script.textContent; |
|
|
|
let attr = script.textContent; |
|
|
|
if (attr) { |
|
|
|
if (attr) { |
|
|
|
js += attr |
|
|
|
js += attr |
|
|
@ -68,8 +69,7 @@ function loadJs(window, jsText) { |
|
|
|
js += jsText |
|
|
|
js += jsText |
|
|
|
} |
|
|
|
} |
|
|
|
js += ";\n" |
|
|
|
js += ";\n" |
|
|
|
console.log('js 加载--->', js) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return js; |
|
|
|
return js; |
|
|
|
} |
|
|
|
} |
|
|
|