mirror of
https://github.com/msojocs/wechat-web-devtools-linux.git
synced 2025-07-22 00:00:04 +08:00
perf: 优化更新弹窗处理方式
This commit is contained in:
parent
940cd4a12d
commit
4b9612b7a6
@ -53,11 +53,11 @@ else
|
||||
fi;
|
||||
|
||||
EXTENSION1="--load-extension=$root_dir/nwjs/package.nw/js/ideplugin"
|
||||
EXTENSION2="--load-extension=$APPDATA/WeappPlugin"
|
||||
EXTENSION2="--load-extension=$APPDATA/WeappPlugin/inspector"
|
||||
INSPECTOR1="--custom-devtools-frontend=file://$root_dir/package.nw/js/ideplugin/inspector" # 要加file://指明为本地文件路径
|
||||
INSPECTOR2="--custom-devtools-frontend=file://$APPDATA/WeappPlugin/inspector/"
|
||||
USERDATADIR="$APPDATA"
|
||||
|
||||
# "$@"参数
|
||||
LANG=zh_CN.UTF-8
|
||||
exec "$root_dir/nwjs/nw" $root_dir/package.nw $EXTENSION2 $INSPECTOR1 "$@"
|
||||
exec "$root_dir/nwjs/nw" $root_dir/package.nw $EXTENSION1 $INSPECTOR1 "$@"
|
@ -125,10 +125,6 @@ else
|
||||
warn "theme位置未找到"
|
||||
fi
|
||||
|
||||
# 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"
|
||||
|
||||
# pack 路径 到 文件
|
||||
notice "pack"
|
||||
node "$pack_script" "$tmp_dir/core.wxvpkg" "$package_dir/core.wxvpkg"
|
||||
|
@ -125,6 +125,7 @@ cat > "$tmp_file" <<EOF
|
||||
console.warn('[wechat-devtools] nw.Window.open is called, url:', url, 'options:', options);
|
||||
let cb = callback
|
||||
if (options.title === '版本更新提示') {
|
||||
options.inject_js_start = 'js/unpack/hackrequire/index.js';
|
||||
cb = (...args) => {
|
||||
const keys = [
|
||||
"shareData",
|
||||
|
Loading…
x
Reference in New Issue
Block a user