This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
appcat
/
dtalk-app
Archived
1
0
Fork 0

优化app内链接跳转

master
宇天 2019-08-13 15:50:05 +08:00
parent e230fa13b3
commit 8842df25dc
2 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{
"name": "dtalk",
"version": "3.8.7",
"version": "3.8.8",
"description": "钉钉-Linux版",
"main": "src/main.js",
"scripts": {

View File

@ -36,7 +36,7 @@ exports.createMainWindow = function(icon) {
win.on('ready-to-show', _ => {
win.show()
// win.openDevTools()
win.openDevTools()
})
win.webContents.on('dom-ready', ev => {
@ -45,10 +45,11 @@ exports.createMainWindow = function(icon) {
const shell = require('electron').shell;
// assuming $ is jQuery
$(document).on('click', 'a[href^="http"]', function(event) {
event.preventDefault();
shell.openExternal(this.href);
if(!this.hasAttribute('nwdirectory')){
event.preventDefault();
shell.openExternal(this.href);
}
});
localStorage.setItem("isBeepOpen", "true");