Skip to content

Conversation

@cyfung1031
Copy link
Collaborator

@cyfung1031 cyfung1031 commented Jan 4, 2026

  • 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

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

Choose a reason for hiding this comment

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

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

@cyfung1031
Copy link
Collaborator Author

cyfung1031 commented Jan 4, 2026

函数签名改动了,我放到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
@cyfung1031
Copy link
Collaborator Author

cyfung1031 commented Jan 4, 2026

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants