|
@@ -144,7 +144,8 @@ findFunction = (jsCode, regexp, platform) => {
|
|
|
if (!/^[$A-Z]+$/.test(varName)) {
|
|
|
continue
|
|
|
}
|
|
|
- const varNameMatch = jsCode.match(new RegExp(`var \\${varName}={(.|\\n)*?};`), 'ig');
|
|
|
+ let reg = "var (\$)?" + varName + "={(.|\\n)*?};"
|
|
|
+ const varNameMatch = jsCode.match(new RegExp(reg), 'ig');
|
|
|
if (varNameMatch && varNameMatch.length >= 1) {
|
|
|
result += varNameMatch[0] + "\n";
|
|
|
}
|