mirror of
https://github.com/msojocs/wechat-web-devtools-linux.git
synced 2025-07-22 00:00:04 +08:00
fix: 更新弹窗无法关闭
This commit is contained in:
parent
bf2fbd90ed
commit
940cd4a12d
@ -1,3 +1,6 @@
|
|||||||
|
# 1.06.2503290-4 / 2025-07-
|
||||||
|
- fix: 更新弹窗无法关闭。
|
||||||
|
|
||||||
# 1.06.2503290-3 / 2025-05-23
|
# 1.06.2503290-3 / 2025-05-23
|
||||||
- update: compiler(Linux) v0.1.5
|
- update: compiler(Linux) v0.1.5
|
||||||
- fix: worker无法使用 #145
|
- fix: worker无法使用 #145
|
||||||
|
@ -53,7 +53,7 @@ else
|
|||||||
fi;
|
fi;
|
||||||
|
|
||||||
EXTENSION1="--load-extension=$root_dir/nwjs/package.nw/js/ideplugin"
|
EXTENSION1="--load-extension=$root_dir/nwjs/package.nw/js/ideplugin"
|
||||||
EXTENSION2=--load-extension=$APPDATA/WeappPlugin
|
EXTENSION2="--load-extension=$APPDATA/WeappPlugin"
|
||||||
INSPECTOR1="--custom-devtools-frontend=file://$root_dir/package.nw/js/ideplugin/inspector" # 要加file://指明为本地文件路径
|
INSPECTOR1="--custom-devtools-frontend=file://$root_dir/package.nw/js/ideplugin/inspector" # 要加file://指明为本地文件路径
|
||||||
INSPECTOR2="--custom-devtools-frontend=file://$APPDATA/WeappPlugin/inspector/"
|
INSPECTOR2="--custom-devtools-frontend=file://$APPDATA/WeappPlugin/inspector/"
|
||||||
USERDATADIR="$APPDATA"
|
USERDATADIR="$APPDATA"
|
||||||
|
@ -128,9 +128,6 @@ fi
|
|||||||
# fix update check
|
# fix update check
|
||||||
notice "fix update check"
|
notice "fix update check"
|
||||||
sed -i 's#</body><script src=../js/core#</body><script src="../js/unpack/hackrequire/index.js"></script><script src=../js/core#' "$package_dir/html/whatsnew.html"
|
sed -i 's#</body><script src=../js/core#</body><script src="../js/unpack/hackrequire/index.js"></script><script src=../js/core#' "$package_dir/html/whatsnew.html"
|
||||||
find_result=$( grep -lr "whatsnew.html" "$tmp_dir/core.wxvpkg" )
|
|
||||||
grep -lr "t=>{R(\"new_version_hint" "$find_result"
|
|
||||||
sed -i 's#t=>{R("new_version_hint#t=>{const keys = ["shareData", "windowMap", "isSimple","masterProxyPort", "proxyPort", "masterH2ProxyPort", "h2ProxyPort"];for(let k of keys)t.window.global[k] = global[k];R("new_version_hint#' $find_result
|
|
||||||
|
|
||||||
# pack 路径 到 文件
|
# pack 路径 到 文件
|
||||||
notice "pack"
|
notice "pack"
|
||||||
|
@ -120,6 +120,28 @@ cat > "$tmp_file" <<EOF
|
|||||||
item.parentMenu = this;
|
item.parentMenu = this;
|
||||||
return originInsert.call(this, item, index);
|
return originInsert.call(this, item, index);
|
||||||
};
|
};
|
||||||
|
const originalOpen = nw.Window.open
|
||||||
|
nw.Window.open = function (url, options, callback) {
|
||||||
|
console.warn('[wechat-devtools] nw.Window.open is called, url:', url, 'options:', options);
|
||||||
|
let cb = callback
|
||||||
|
if (options.title === '版本更新提示') {
|
||||||
|
cb = (...args) => {
|
||||||
|
const keys = [
|
||||||
|
"shareData",
|
||||||
|
"windowMap",
|
||||||
|
"isSimple",
|
||||||
|
"masterProxyPort",
|
||||||
|
"proxyPort",
|
||||||
|
"masterH2ProxyPort",
|
||||||
|
"h2ProxyPort"
|
||||||
|
];
|
||||||
|
for(let k of keys)
|
||||||
|
args[0].window.global[k] = global[k];
|
||||||
|
callback(...args)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return originalOpen.apply(this, [url, options, cb])
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
process.stderr.write(error.message);
|
process.stderr.write(error.message);
|
||||||
process.stderr.write(error.stack);
|
process.stderr.write(error.stack);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user