Skip to content

Commit

Permalink
🐛 修复@grant GM.*声明问题 #243
Browse files Browse the repository at this point in the history
  • Loading branch information
CodFrm committed Dec 18, 2023
1 parent 2e378c3 commit 6d7efa6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/runtime/background/permission_verify.ts
Expand Up @@ -234,7 +234,14 @@ export default class PermissionVerify {
}

for (let i = 0; i < grant.length; i += 1) {
if (grant[i] === request.api || grant[i] === api.param.link) {
if (
// 名称相等
grant[i] === request.api ||
// 别名相等
(api.param.alias && api.param.alias.includes(grant[i])) ||
// 有关联的
grant[i] === api.param.link
) {
// 需要用户确认
if (api.param.confirm) {
return this.pushConfirmQueue(request, api);
Expand Down

0 comments on commit 6d7efa6

Please sign in to comment.