Skip to content

Commit 6d7efa6

Browse files
committed
🐛 修复@grant GM.*声明问题 #243
1 parent 2e378c3 commit 6d7efa6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/runtime/background/permission_verify.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,14 @@ export default class PermissionVerify {
234234
}
235235

236236
for (let i = 0; i < grant.length; i += 1) {
237-
if (grant[i] === request.api || grant[i] === api.param.link) {
237+
if (
238+
// 名称相等
239+
grant[i] === request.api ||
240+
// 别名相等
241+
(api.param.alias && api.param.alias.includes(grant[i])) ||
242+
// 有关联的
243+
grant[i] === api.param.link
244+
) {
238245
// 需要用户确认
239246
if (api.param.confirm) {
240247
return this.pushConfirmQueue(request, api);

0 commit comments

Comments
 (0)