Skip to content

Commit

Permalink
Fix adguard storage (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
OctoNezd committed Jul 1, 2024
1 parent f7742ba commit 2ace6aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/extensionPreferences/userScriptStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ export default class UserScriptStore {
return GM.setValue(key, value);
}
async get(key: string) {
return (await GM.getValue(key))[key];
let val = await GM.getValue(key);
if (val === undefined) return val;
return val[key];
}
name = "gmStore";
}
2 changes: 2 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ const userScriptBanner = `// ==UserScript==
// @icon https://raw.githubusercontent.com/OctoNezd/oldlander/main/icons/icon.png
// @grant GM.setValue
// @grant GM.getValue
// @grant GM_getValue
// @grant GM_setValue
// @run-at document-start
// ==/UserScript==
`;
Expand Down

0 comments on commit 2ace6aa

Please sign in to comment.