Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

定时脚本使用 GM_openInTab() 会多次打开 #147

Closed
zhongsir98 opened this issue Feb 25, 2023 · 4 comments
Closed

定时脚本使用 GM_openInTab() 会多次打开 #147

zhongsir98 opened this issue Feb 25, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@zhongsir98
Copy link

初步判断 一个GM_openInTab 会打开三次页面,(chrome \edge 其他未测试)

// ==UserScript==
// @name 定时任务,作为打开页面功能
// @namespace https://bbs.tampermonkey.net.cn/
// @Version 0.1.0
// @description try to take over the world!
// @author You
// @crontab 0 21 * * *
// @grant GM_openInTab
// ==/UserScript==

return new Promise((resolve, reject) => {
// Your code here...
GM_openInTab('https://www.baidu.com')
resolve();
});

@CodFrm
Copy link
Member

CodFrm commented Feb 25, 2023

没有复现成功,点击立即运行一次呢?

@zhongsir98
Copy link
Author

我也复现不出了,这还薛定谔了;
调试运行完全正常的,这几日正式使用都碰上了

@CodFrm
Copy link
Member

CodFrm commented Feb 26, 2023

好像是更新脚本导致的,老版本没有停止计时器

@CodFrm CodFrm added the bug Something isn't working label Feb 26, 2023
@CodFrm
Copy link
Member

CodFrm commented Mar 2, 2023

@CodFrm CodFrm closed this as completed Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants