fix: Compatibility before chrome116 (#1034)
Co-authored-by: cbingb666 <cbingb666@163.com>
This commit is contained in:
parent
97d7470201
commit
9b94332b22
|
|
@ -44,7 +44,7 @@ export const getRSS = async (tabId, url) => {
|
|||
tabId,
|
||||
})
|
||||
|
||||
if (chrome.offscreen) {
|
||||
if (chrome.offscreen && chrome.runtime.getContexts) {
|
||||
await setupOffscreenDocument("tabs/offscreen.html")
|
||||
chrome.runtime.sendMessage({
|
||||
target: "offscreen",
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ const storage = new Storage({
|
|||
export const refreshRules = async () => {
|
||||
const rules = await getRemoteRules()
|
||||
await storage.set("rules", rules)
|
||||
if (chrome.offscreen) {
|
||||
if (chrome.offscreen && chrome.runtime.getContexts) {
|
||||
await setupOffscreenDocument("tabs/offscreen.html")
|
||||
chrome.runtime.sendMessage({
|
||||
target: "offscreen",
|
||||
|
|
|
|||
Loading…
Reference in New Issue