Skip to content

Commit

Permalink
fix: broken displayedRules
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Dec 26, 2023
1 parent c31e21d commit d4eac38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/background/rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Storage } from "@plasmohq/storage"
import { getRemoteRules } from "~/lib/rules"
import { getConfig } from "~/lib/config"
import { getDisplayedRules as sandboxGetDisplayedRules } from "~/sandboxes"
import { setupOffscreenDocument } from "~/lib/offscreen"

const storage = new Storage({
area: "local"
Expand All @@ -11,6 +12,7 @@ export const refreshRules = async () => {
const rules = await getRemoteRules()
await storage.set("rules", rules)
if (chrome.offscreen) {
await setupOffscreenDocument("tabs/offscreen.html")
chrome.runtime.sendMessage({
target: "offscreen",
data: {
Expand Down
2 changes: 1 addition & 1 deletion src/sandboxes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const getRSS = async ({
})
}

export const getDisplayedRules = async (rules: string) => {
export const getDisplayedRules = (rules: string) => {
const displayedRules = parseRules(rules)
removeFunctionFields(displayedRules)
console.debug("requestDisplayedRules", displayedRules)
Expand Down

0 comments on commit d4eac38

Please sign in to comment.