Skip to content

Commit

Permalink
🐛 修复火狐url获取错误的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
CodFrm committed Jan 18, 2022
1 parent 4d29cae commit 854dd26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/apps/grant/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ export class BackgroundGrant {
}

protected isExtensionRequest(details: chrome.webRequest.ResourceRequest & { originUrl?: string }): boolean {
return (details.initiator && chrome.extension.getURL('').startsWith(details.initiator)) ||
(details.originUrl && details.originUrl.startsWith(chrome.extension.getURL(''))) ? true : false;
return (details.initiator && chrome.runtime.getURL('').startsWith(details.initiator)) ||
(details.originUrl && details.originUrl.startsWith(chrome.runtime.getURL(''))) ? true : false;
}

// 单实例
Expand Down

0 comments on commit 854dd26

Please sign in to comment.