fbba6b37c2daabc5665f995c61d26986971c54c110e88fae12a682da05ab00a3.json raw
1 {"ast":null,"code":"import _asyncToGenerator from \"/home/mleku/src/orly.dev/next/signer/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { SignerMetaHandler } from '@common';\nimport browser from 'webextension-polyfill';\nexport class FirefoxMetaHandler extends SignerMetaHandler {\n loadFullData() {\n var _this = this;\n return _asyncToGenerator(function* () {\n const dataWithPossibleAlienProperties = yield browser.storage.local.get(null);\n if (Object.keys(dataWithPossibleAlienProperties).length === 0) {\n return dataWithPossibleAlienProperties;\n }\n const data = {};\n _this.metaProperties.forEach(property => {\n data[property] = dataWithPossibleAlienProperties[property];\n });\n return data;\n })();\n }\n saveFullData(data) {\n return _asyncToGenerator(function* () {\n yield browser.storage.local.set(data);\n console.log(data);\n })();\n }\n clearData(keep) {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n const toBeRemovedProperties = [];\n for (const property of _this2.metaProperties) {\n if (!keep.includes(property)) {\n toBeRemovedProperties.push(property);\n }\n }\n yield browser.storage.local.remove(_this2.metaProperties);\n })();\n }\n}","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}