Skip to content

🐞 fix: 修复GM.getTab、GM.getTabs - #683

Merged
CodFrm merged 5 commits into
scriptscat:mainfrom
WhiteSevs:fix-gm-async-api
Aug 29, 2025
Merged

CodFrm merged 5 commits into
scriptscat:mainfrom
WhiteSevs:fix-gm-async-api

Conversation

@WhiteSevs

Copy link
Copy Markdown
Contributor

No description provided.

@cyfung1031

cyfung1031 commented Aug 27, 2025

Copy link
Copy Markdown
Collaborator

@WhiteSevs 根据FireMonkey的调查,GM.getTab 和 GM.getTabs 都是sync
所以现在的设计跟油猴一致不用改

https://erosman.github.io/support/content/help.html#api

呀。我好像錯了
你是對的


單元測試要修改
src/app/service/content/exec_script.test.ts

    expect(ret["GM.getTab"].name).toEqual("bound GM_getTab");
    expect(ret["GM.getTabs"].name).toEqual("bound GM_getTabs");

改做

    expect(ret["GM.getTab"].name).toEqual("bound GM.getTab");
    expect(ret["GM.getTabs"].name).toEqual("bound GM.getTabs");

@CodFrm
CodFrm merged commit 31de256 into scriptscat:main Aug 29, 2025
2 of 3 checks passed
@WhiteSevs
WhiteSevs deleted the fix-gm-async-api branch September 5, 2025 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants