Skip to content

Commit

Permalink
Merge branch 'feature/destroy-esc-key'
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenYarong committed Oct 24, 2019
2 parents 710179b + b8e235d commit 94e121f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
"build:linux64": "./scripts/build.sh linux x64",
"build:win": ".\\scripts\\build-win32.bat win32 ia32",
"build:win32": ".\\scripts\\build-win32.bat win32 ia32",
"build:win64": ".\\scripts\\build-win32.bat win32 x64"
"build:win64": ".\\scripts\\build-win32.bat win32 x64",
"pack": "electron-builder -l --x64",
"postinstall": "electron-builder install-app-deps"
},
"build": {
"appId": "electron-wechat"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fi

ignore_list="dist|scripts|\.idea|.*\.md|.*\.yml|node_modules/nodejieba"

electron-packager . "${APP_NAME}" --platform=$PLATFORM --arch=$ARCH --electronVersion=1.4.15 --app-version=1.4.0 --asar --icon=assets/icon.icns --overwrite --out=./dist --ignore=${ignore_list}
electron-packager . "${APP_NAME}" --platform=$PLATFORM --arch=$ARCH --electronVersion=7.0.0 --app-version=1.4.0 --asar --icon=assets/icon.icns --overwrite --out=./dist --ignore=${ignore_list}

if [ $? -eq 0 ]; then
echo -e "$(tput setaf 2)Packaging for $PLATFORM $ARCH succeeded.$(tput sgr0)\n"
Expand Down
4 changes: 2 additions & 2 deletions src/inject/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ CSSInjector.commonCSS = `
display: none !important;
}
* {
-webkit-user-select: none;
-webkit-user-select: text;
cursor: default !important;
-webkit-user-drag: none;
}
pre, input {
-webkit-user-select: initial;
-webkit-user-select: text;
cursor: initial !important;
}
html, body {
Expand Down
6 changes: 4 additions & 2 deletions src/windows/controllers/wechat.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ class WeChatWindow {
}

loadURL(url) {
this.wechatWindow.loadURL(url);
this.wechatWindow.loadURL(url, {
userAgent: Common.USER_AGENT[process.platform]
});
}

show() {
Expand Down Expand Up @@ -112,7 +114,7 @@ class WeChatWindow {
}

initWindowWebContent() {
this.wechatWindow.webContents.setUserAgent(Common.USER_AGENT[process.platform]);
// this.wechatWindow.webContents.setUserAgent(Common.USER_AGENT[process.platform]);
if (Common.DEBUG_MODE) {
this.wechatWindow.webContents.openDevTools();
}
Expand Down

0 comments on commit 94e121f

Please sign in to comment.