From 8842df25dc81679b343bee1fff1e87fcf5da5f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Tue, 13 Aug 2019 15:50:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96app=E5=86=85=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/tools/windows.js | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 08c2d8d..79cc505 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dtalk", - "version": "3.8.7", + "version": "3.8.8", "description": "้’‰้’‰-Linux็‰ˆ", "main": "src/main.js", "scripts": { diff --git a/src/tools/windows.js b/src/tools/windows.js index 78eb84d..2a92cb1 100644 --- a/src/tools/windows.js +++ b/src/tools/windows.js @@ -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");