Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[v1.3] GM API 定义修正 #1132

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

Open
cyfung1031 wants to merge 1 commit into scriptscat:release/v1.3
base: release/v1.3
Choose a base branch
Loading
from cyfung1031:pr-GM-api-fix05991

Conversation

@cyfung1031
Copy link
Collaborator

@cyfung1031 cyfung1031 commented Jan 4, 2026
edited
Loading

  • GM API 的 promise 跟隨 TM, 而非 alias

@cyfung1031 cyfung1031 marked this pull request as draft January 4, 2026 05:38
@CodFrm CodFrm changed the base branch from main to release/v1.3 January 4, 2026 05:56
Copy link
Member

@CodFrm CodFrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

函数签名改动了,我放到release/v1.3了

}

@GMContext.API()
@GMContext.API({depend: ["GM_setValue"]})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

怎么依赖自己

Copy link
Collaborator Author

@cyfung1031 cyfung1031 Jan 4, 2026
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

只为了统一写好看一点。依赖的部份是后台 service_worker 的 GM_setValue
当然因为同一名字,service_worker 的 GM_setValue 会自动授权

Copy link
Collaborator Author

@cyfung1031 cyfung1031 Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

呀,我理解錯了。加了可能有問題。我改

Copy link
Collaborator Author

cyfung1031 commented Jan 4, 2026
edited
Loading

函数签名改动了,我放到release/v1.3了

(削除) 你喜欢吧。我看起来是 bug ( 跟TM不一致) (削除ここまで)

@cyfung1031 cyfung1031 marked this pull request as ready for review January 4, 2026 06:59
@cyfung1031 cyfung1031 marked this pull request as draft January 4, 2026 07:18
@cyfung1031 cyfung1031 marked this pull request as ready for review January 4, 2026 07:19
Copy link
Collaborator Author

cyfung1031 commented Jan 4, 2026
edited
Loading

ScriptCat 設計問題,@grant 的 async 版 vs sync 版 問題先不處理


this.XXXX 設計導致 需要 depend
這會跟 TM 不一致

@grant GM.getTab
這個在TM不會有 GM_getTab
但SC有 GM_getTab

反過來 TM GM_XXXX 會同時給予 GM.XXXX
但SC沒有

不 depend 的話在後台API加 link也是可行
前台API要改 this.xxxx 寫法


現在搞一堆 this this this的 OOP設計
又要bind又要depend...
不太支持這做法

@CodFrm CodFrm changed the title (削除) GM API 定义修正 (削除ここまで) (追記) [v1.3] GM API 定义修正 (追記ここまで) Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@CodFrm CodFrm CodFrm left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /