Skip to content

Commit 7d2a5b2

Browse files
committed
🐛 修复GM_openInTab默认在后台打开页面的问题
1 parent 3de39e7 commit 7d2a5b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/background/gm_api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ export default class GMApi {
486486
channel.disChannel();
487487
}
488488
} else {
489-
chrome.tabs.create({ url, active: options.active }, (tab) => {
489+
chrome.tabs.create({ url, active: options.active || true }, (tab) => {
490490
Cache.getInstance().set(`GM_openInTab:${tab.id}`, channel);
491491
channel.send({ event: "oncreate", tabId: tab.id });
492492
});

0 commit comments

Comments
 (0)