Add some utilities to the options page to dump the settings and backup data.
This commit is contained in:
parent
f00b4161c3
commit
d20a98c0a4
|
@ -3,7 +3,7 @@
|
|||
"manifest_version": 2,
|
||||
"name": "Queue",
|
||||
"description": "A WebExtension for queueing links.",
|
||||
"version": "0.1.6",
|
||||
"version": "0.1.7",
|
||||
"permissions": [
|
||||
"contextMenus",
|
||||
"storage",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import {html, render} from 'htm/preact';
|
||||
import {
|
||||
initializeBackgroundMessageHandler,
|
||||
log,
|
||||
getManifest,
|
||||
getSettings,
|
||||
PageFooter,
|
||||
|
@ -12,6 +13,15 @@ import {
|
|||
(async () => {
|
||||
initializeBackgroundMessageHandler();
|
||||
|
||||
window.HollloQueue = {
|
||||
dumpBackup: async () => {
|
||||
log(JSON.stringify(await browser.storage.local.get(), null, 2));
|
||||
},
|
||||
dumpSettings: async () => {
|
||||
log(JSON.stringify(await getSettings(), null, 2));
|
||||
}
|
||||
};
|
||||
|
||||
const manifest = getManifest();
|
||||
const settings = await getSettings();
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
// TypeScript fix to make it see this file as a module.
|
||||
export {};
|
||||
|
||||
type HollloQueue = {
|
||||
dumpBackup: () => Promise<void>;
|
||||
dumpSettings: () => Promise<void>;
|
||||
};
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
HollloQueue: HollloQueue;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue