Skip to content

Commit

Permalink
fix: kaspersky trojan horse false positive mitigation
Browse files Browse the repository at this point in the history
  • Loading branch information
abose committed Sep 2, 2024
1 parent b6e923c commit 3dd832d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/phoenix/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,17 @@ Phoenix.app = {
}
return window.__TAURI__.tauri.invoke("zoom_window", {scaleFactor: scaleFactor});
},
_openUrlInBrowserWin: function (url, browser) {
// private API for internal use only. May be removed at any time.
// Please use NodeUtils.openUrlInBrowser for a platform independent equivalent of this.
if(!Phoenix.isNativeApp){
throw new Error("_openUrlInBrowserWin is not supported in browsers");
}
if(Phoenix.platform !== "win") {
throw new Error("_openUrlInBrowserWin is only supported in windows");
}
return window.__TAURI__.invoke('_open_url_in_browser_win', { url, browser });
},
getApplicationSupportDirectory: Phoenix.VFS.getAppSupportDir,
getExtensionsDirectory: Phoenix.VFS.getExtensionDir,
getUserDocumentsDirectory: Phoenix.VFS.getUserDocumentsDirectory,
Expand Down
3 changes: 3 additions & 0 deletions src/utils/NodeUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ define(function (require, exports, module) {
if(!Phoenix.isNativeApp) {
throw new Error("openUrlInBrowser not available in browser");
}
if(Phoenix.platform === "win") {
return Phoenix.app._openUrlInBrowserWin(url, browserName);
}
return utilsConnector.execPeer("openUrlInBrowser", {url, browserName});
}

Expand Down

0 comments on commit 3dd832d

Please sign in to comment.