Skip to content

Commit

Permalink
MV3: Remove pageAction
Browse files Browse the repository at this point in the history
  • Loading branch information
Nomes77 authored Jan 18, 2023
1 parent 55b2ba0 commit 50fd661
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/js/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ async function enableDisableReplaceTab() {
await browser.storage.local.set({replaceTabEnabled: !!checkbox.checked});
}

async function enableDisablePageAction() {
const checkbox = document.querySelector("#pageActionCheck");
await browser.storage.local.set({pageActionEnabled: !!checkbox.checked});
await browser.runtime.sendMessage({ method: "resetPageAction" });
}

async function changeTheme(event) {
const theme = event.currentTarget;
await browser.storage.local.set({currentTheme: theme.value});
Expand Down Expand Up @@ -118,12 +112,10 @@ async function restoreContainers(event) {
async function setupOptions() {
const { syncEnabled } = await browser.storage.local.get("syncEnabled");
const { replaceTabEnabled } = await browser.storage.local.get("replaceTabEnabled");
const { pageActionEnabled } = await browser.storage.local.get({ pageActionEnabled: true });
const { currentThemeId } = await browser.storage.local.get("currentThemeId");

document.querySelector("#syncCheck").checked = !!syncEnabled;
document.querySelector("#replaceTabCheck").checked = !!replaceTabEnabled;
document.querySelector("#pageActionCheck").checked = !!pageActionEnabled;
document.querySelector("#changeTheme").selectedIndex = currentThemeId;
setupContainerShortcutSelects();
}
Expand Down Expand Up @@ -181,7 +173,6 @@ browser.permissions.onRemoved.addListener(resetPermissionsUi);
document.addEventListener("DOMContentLoaded", setupOptions);
document.querySelector("#syncCheck").addEventListener( "change", enableDisableSync);
document.querySelector("#replaceTabCheck").addEventListener( "change", enableDisableReplaceTab);
document.querySelector("#pageActionCheck").addEventListener( "change", enableDisablePageAction);
document.querySelector("#changeTheme").addEventListener( "change", changeTheme);
document.querySelector("#containersRestoreInput").addEventListener( "change", restoreContainers);

Expand Down

0 comments on commit 50fd661

Please sign in to comment.