File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -261,17 +261,18 @@ func (p *XmlParser) Parse(option config.WxapkgInfo) error {
261261 codeStr := string (code )
262262 scriptCode := codeStr
263263
264- scriptCode = strings .Replace (scriptCode , "var setCssToHead =" , "var setCssToHead2 =" , 1 )
265- scriptCode = strings .Replace (scriptCode , "var noCss" , "var noCss2" , - 1 )
266-
267264 // 防止报错
268- patch := `var noCss=true;var window={};var navigator={};navigator.userAgent="iPhone";window.screen={};document={};function define(){};function require(){};`
265+ patch := `var noCss=true;var window={};var navigator={};navigator.userAgent="iPhone";window.screen={};
266+ document={getElementsByTagName:()=>{}};function define(){};function require(){};`
269267
270268 // 如果是 html 文件,提取 script 代码
271269 if strings .HasSuffix (frameFile , ".html" ) {
272270 scriptCode = matchScripts (codeStr )
273271 }
274272
273+ scriptCode = strings .Replace (scriptCode , "var setCssToHead =" , "var setCssToHead2 =" , 1 )
274+ scriptCode = strings .Replace (scriptCode , "var noCss" , "var noCss2" , - 1 )
275+
275276 // 正则匹配生成函数
276277 getFuc (scriptCode , gwx )
277278
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ func main() {
5050| |\ \| | | | \ / / /_/ / (_| \__ \ <| | | |
5151\_| \_/_|_|_| \/ \__,_|\__,_|___/_|\_\_| |_|
5252
53- Wxapkg Decompiler Tool v2.2.1
53+ Wxapkg Decompiler Tool v2.3.0
5454 `
5555 fmt .Println (banner )
5656
You can’t perform that action at this time.
0 commit comments