Skip to content

【BUG】脚本代码页保存后调试代码未更新 #163

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

Closed
DreamNya opened this issue Apr 2, 2023 · 2 comments
Closed

【BUG】脚本代码页保存后调试代码未更新 #163

DreamNya opened this issue Apr 2, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@DreamNya
Copy link
Contributor

DreamNya commented Apr 2, 2023

脚本代码页修改代码后保存,直接调试,实际调试代码为旧代码和旧存储。
必须要刷新页面后再调试才是新代码和新存储

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

CodFrm commented May 21, 2023

代码好像不是旧的,不过储存是旧的

@CodFrm
Copy link
Member

CodFrm commented May 21, 2023

修复,一个测试脚本:

// ==UserScript==
// @name         New Userscript
// @namespace    https://bbs.tampermonkey.net.cn/
// @version      0.1.0
// @description  try to take over the world!
// @author       You
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_addValueChangeListener
// @background
// ==/UserScript==

console.log(GM_getValue('num'));

GM_setValue('num', (GM_getValue('num') || 0) + 1);


GM_addValueChangeListener('num', (a, b, c) => {
    console.log(a, b, c);
});

return new Promise(resolve => {
    setTimeout(() => {
        resolve();
    }, 10000)
})

@CodFrm CodFrm closed this as completed May 21, 2023
CodFrm added a commit that referenced this issue May 21, 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