|
@@ -60,6 +60,7 @@ browser.runtime.sendMessage({ method: "config.getConstants" }).then(data => {
|
|
|
init();
|
|
init();
|
|
|
});
|
|
});
|
|
|
const removeHiddenElementsLabel = document.getElementById("removeHiddenElementsLabel");
|
|
const removeHiddenElementsLabel = document.getElementById("removeHiddenElementsLabel");
|
|
|
|
|
+const removedElementsSelectorLabel = document.getElementById("removedElementsSelectorLabel");
|
|
|
const removeUnusedStylesLabel = document.getElementById("removeUnusedStylesLabel");
|
|
const removeUnusedStylesLabel = document.getElementById("removeUnusedStylesLabel");
|
|
|
const removeUnusedFontsLabel = document.getElementById("removeUnusedFontsLabel");
|
|
const removeUnusedFontsLabel = document.getElementById("removeUnusedFontsLabel");
|
|
|
const removeFramesLabel = document.getElementById("removeFramesLabel");
|
|
const removeFramesLabel = document.getElementById("removeFramesLabel");
|
|
@@ -228,6 +229,7 @@ const fileInput = document.getElementById("fileInput");
|
|
|
const profileNamesInput = document.getElementById("profileNamesInput");
|
|
const profileNamesInput = document.getElementById("profileNamesInput");
|
|
|
const customShortcutInput = document.getElementById("customShortcutInput");
|
|
const customShortcutInput = document.getElementById("customShortcutInput");
|
|
|
const removeHiddenElementsInput = document.getElementById("removeHiddenElementsInput");
|
|
const removeHiddenElementsInput = document.getElementById("removeHiddenElementsInput");
|
|
|
|
|
+const removedElementsSelectorInput = document.getElementById("removedElementsSelectorInput");
|
|
|
const removeUnusedStylesInput = document.getElementById("removeUnusedStylesInput");
|
|
const removeUnusedStylesInput = document.getElementById("removeUnusedStylesInput");
|
|
|
const removeUnusedFontsInput = document.getElementById("removeUnusedFontsInput");
|
|
const removeUnusedFontsInput = document.getElementById("removeUnusedFontsInput");
|
|
|
const removeFramesInput = document.getElementById("removeFramesInput");
|
|
const removeFramesInput = document.getElementById("removeFramesInput");
|
|
@@ -680,6 +682,7 @@ addProfileButton.title = browser.i18n.getMessage("profileAddButtonTooltip");
|
|
|
deleteProfileButton.title = browser.i18n.getMessage("profileDeleteButtonTooltip");
|
|
deleteProfileButton.title = browser.i18n.getMessage("profileDeleteButtonTooltip");
|
|
|
renameProfileButton.title = browser.i18n.getMessage("profileRenameButtonTooltip");
|
|
renameProfileButton.title = browser.i18n.getMessage("profileRenameButtonTooltip");
|
|
|
removeHiddenElementsLabel.textContent = browser.i18n.getMessage("optionRemoveHiddenElements");
|
|
removeHiddenElementsLabel.textContent = browser.i18n.getMessage("optionRemoveHiddenElements");
|
|
|
|
|
+removedElementsSelectorLabel.textContent = browser.i18n.getMessage("optionRemovedElementsSelector");
|
|
|
removeUnusedStylesLabel.textContent = browser.i18n.getMessage("optionRemoveUnusedStyles");
|
|
removeUnusedStylesLabel.textContent = browser.i18n.getMessage("optionRemoveUnusedStyles");
|
|
|
removeUnusedFontsLabel.textContent = browser.i18n.getMessage("optionRemoveUnusedFonts");
|
|
removeUnusedFontsLabel.textContent = browser.i18n.getMessage("optionRemoveUnusedFonts");
|
|
|
removeFramesLabel.textContent = browser.i18n.getMessage("optionRemoveFrames");
|
|
removeFramesLabel.textContent = browser.i18n.getMessage("optionRemoveFrames");
|
|
@@ -1015,6 +1018,7 @@ async function refresh(profileName) {
|
|
|
renameProfileButton.disabled = deleteProfileButton.disabled = profileNamesInput.value == DEFAULT_PROFILE_NAME;
|
|
renameProfileButton.disabled = deleteProfileButton.disabled = profileNamesInput.value == DEFAULT_PROFILE_NAME;
|
|
|
const profileOptions = profiles[selectedProfileName];
|
|
const profileOptions = profiles[selectedProfileName];
|
|
|
removeHiddenElementsInput.checked = profileOptions.removeHiddenElements;
|
|
removeHiddenElementsInput.checked = profileOptions.removeHiddenElements;
|
|
|
|
|
+ removedElementsSelectorInput.value = profileOptions.removedElementsSelector;
|
|
|
removeUnusedStylesInput.checked = profileOptions.removeUnusedStyles;
|
|
removeUnusedStylesInput.checked = profileOptions.removeUnusedStyles;
|
|
|
removeUnusedFontsInput.checked = profileOptions.removeUnusedFonts;
|
|
removeUnusedFontsInput.checked = profileOptions.removeUnusedFonts;
|
|
|
removeFramesInput.checked = profileOptions.removeFrames;
|
|
removeFramesInput.checked = profileOptions.removeFrames;
|
|
@@ -1212,6 +1216,7 @@ async function update() {
|
|
|
profileName: selectedProfileName,
|
|
profileName: selectedProfileName,
|
|
|
profile: {
|
|
profile: {
|
|
|
removeHiddenElements: removeHiddenElementsInput.checked,
|
|
removeHiddenElements: removeHiddenElementsInput.checked,
|
|
|
|
|
+ removedElementsSelector: removedElementsSelectorInput.value,
|
|
|
removeUnusedStyles: removeUnusedStylesInput.checked,
|
|
removeUnusedStyles: removeUnusedStylesInput.checked,
|
|
|
removeUnusedFonts: removeUnusedFontsInput.checked,
|
|
removeUnusedFonts: removeUnusedFontsInput.checked,
|
|
|
removeFrames: removeFramesInput.checked,
|
|
removeFrames: removeFramesInput.checked,
|