优化app内链接跳转
parent
e230fa13b3
commit
8842df25dc
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "dtalk",
|
||||
"version": "3.8.7",
|
||||
"version": "3.8.8",
|
||||
"description": "钉钉-Linux版",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -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");
|
||||
|
|
Reference in New Issue