Skip to content

Commit

Permalink
修复自定义浏览器后打开链接无反应的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xh321 committed Mar 12, 2024
1 parent f7cbef0 commit 1379d1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "二维码解析",
"slug": "qr_code",
"description": "对聊天消息中的二维码进行解析",
"version": "1.3.8",
"version": "1.3.9",
"icon": "./icon.png",
"authors": [
{
Expand All @@ -16,7 +16,7 @@
"repo": "xh321/LiteLoaderQQNT-QR-Decode",
"branch": "master",
"release": {
"tag": "1.3.8"
"tag": "1.3.9"
}
},
"platform": ["win32", "darwin", "linux"],
Expand Down
3 changes: 2 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { ipcMain, dialog, shell, clipboard } = require("electron");

const fs = require("fs");
const exec = require("child_process").exec;
var defaultBrowser = LiteLoader.api.config.get("qr_decode", {
browser: "",
Expand All @@ -13,6 +13,7 @@ function openUrl(url) {
fs.existsSync(defaultBrowser.browser)
) {
var cmd = '"' + defaultBrowser.browser + '"' + ' "' + url + '"';

exec(cmd);
} else {
shell.openExternal(url);
Expand Down

0 comments on commit 1379d1a

Please sign in to comment.