Skip to content

Commit 3dd832d

Browse files
committed
fix: kaspersky trojan horse false positive mitigation
1 parent b6e923c commit 3dd832d

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/phoenix/shell.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,17 @@ Phoenix.app = {
515515
}
516516
return window.__TAURI__.tauri.invoke("zoom_window", {scaleFactor: scaleFactor});
517517
},
518+
_openUrlInBrowserWin: function (url, browser) {
519+
// private API for internal use only. May be removed at any time.
520+
// Please use NodeUtils.openUrlInBrowser for a platform independent equivalent of this.
521+
if(!Phoenix.isNativeApp){
522+
throw new Error("_openUrlInBrowserWin is not supported in browsers");
523+
}
524+
if(Phoenix.platform !== "win") {
525+
throw new Error("_openUrlInBrowserWin is only supported in windows");
526+
}
527+
return window.__TAURI__.invoke('_open_url_in_browser_win', { url, browser });
528+
},
518529
getApplicationSupportDirectory: Phoenix.VFS.getAppSupportDir,
519530
getExtensionsDirectory: Phoenix.VFS.getExtensionDir,
520531
getUserDocumentsDirectory: Phoenix.VFS.getUserDocumentsDirectory,

src/utils/NodeUtils.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ define(function (require, exports, module) {
7575
if(!Phoenix.isNativeApp) {
7676
throw new Error("openUrlInBrowser not available in browser");
7777
}
78+
if(Phoenix.platform === "win") {
79+
return Phoenix.app._openUrlInBrowserWin(url, browserName);
80+
}
7881
return utilsConnector.execPeer("openUrlInBrowser", {url, browserName});
7982
}
8083

0 commit comments

Comments
 (0)