迁移部分内容
Some checks failed
test / Run tests (push) Failing after 55s
build / Build (push) Failing after 1m18s
Some checks failed
test / Run tests (push) Failing after 55s
build / Build (push) Failing after 1m18s
This commit is contained in:
20
example/gm_tab.js
Normal file
20
example/gm_tab.js
Normal file
@ -0,0 +1,20 @@
|
||||
// ==UserScript==
|
||||
// @name gm open tab
|
||||
// @namespace https://bbs.tampermonkey.net.cn/
|
||||
// @version 0.1.0
|
||||
// @description 打开一个标签页
|
||||
// @author You
|
||||
// @match https://bbs.tampermonkey.net.cn/
|
||||
// @grant GM_openInTab
|
||||
// ==/UserScript==
|
||||
|
||||
const tab = GM_openInTab("https://scriptcat.org/search");
|
||||
|
||||
tab.onclose = () => {
|
||||
console.log("close");
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
tab.close();
|
||||
}, 3000)
|
||||
|
Reference in New Issue
Block a user