for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
import { getGlobalStorageProvider } from "./browserApi/storageProvider";
import { onReady } from "./utils/helpers";
const OPTION_SELECTOR = 'input[type="checkbox"';
function storeOptions() {
document.querySelectorAll(OPTION_SELECTOR).forEach(optionElement => {
getGlobalStorageProvider().setData(optionElement.id, optionElement.checked);
});
}
function restoreOptions() {
let defaultValue = optionElement.dataset.defaultValue === 'true' ? true : false;
getGlobalStorageProvider().getData(optionElement.id, defaultValue, value => {
optionElement.checked = value;
function resetOptions() {
optionElement.checked = defaultValue;
onReady(() => {
// register Store Button
document.getElementById('btnSave').addEventListener('click', event => {
event.preventDefault();
storeOptions();
document.getElementById('btnReset').addEventListener('click', event => {
resetOptions();
})
// try restore options
restoreOptions();
// update version label
document.getElementById('version').innerText = `v${chrome.runtime.getManifest().version}`
chrome
/** global: chrome */
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.