|
@@ -67,6 +67,7 @@
|
|
|
const removeAlternativeImagesLabel = document.getElementById("removeAlternativeImagesLabel");
|
|
const removeAlternativeImagesLabel = document.getElementById("removeAlternativeImagesLabel");
|
|
|
const removeAlternativeMediasLabel = document.getElementById("removeAlternativeMediasLabel");
|
|
const removeAlternativeMediasLabel = document.getElementById("removeAlternativeMediasLabel");
|
|
|
const saveCreatedBookmarksLabel = document.getElementById("saveCreatedBookmarksLabel");
|
|
const saveCreatedBookmarksLabel = document.getElementById("saveCreatedBookmarksLabel");
|
|
|
|
|
+ const replaceBookmarkURLLabel = document.getElementById("replaceBookmarkURLLabel");
|
|
|
const titleLabel = document.getElementById("titleLabel");
|
|
const titleLabel = document.getElementById("titleLabel");
|
|
|
const userInterfaceLabel = document.getElementById("userInterfaceLabel");
|
|
const userInterfaceLabel = document.getElementById("userInterfaceLabel");
|
|
|
const filenameLabel = document.getElementById("filenameLabel");
|
|
const filenameLabel = document.getElementById("filenameLabel");
|
|
@@ -136,6 +137,7 @@
|
|
|
const removeAlternativeImagesInput = document.getElementById("removeAlternativeImagesInput");
|
|
const removeAlternativeImagesInput = document.getElementById("removeAlternativeImagesInput");
|
|
|
const removeAlternativeMediasInput = document.getElementById("removeAlternativeMediasInput");
|
|
const removeAlternativeMediasInput = document.getElementById("removeAlternativeMediasInput");
|
|
|
const saveCreatedBookmarksInput = document.getElementById("saveCreatedBookmarksInput");
|
|
const saveCreatedBookmarksInput = document.getElementById("saveCreatedBookmarksInput");
|
|
|
|
|
+ const replaceBookmarkURLInput = document.getElementById("replaceBookmarkURLInput");
|
|
|
const groupDuplicateImagesInput = document.getElementById("groupDuplicateImagesInput");
|
|
const groupDuplicateImagesInput = document.getElementById("groupDuplicateImagesInput");
|
|
|
const infobarTemplateInput = document.getElementById("infobarTemplateInput");
|
|
const infobarTemplateInput = document.getElementById("infobarTemplateInput");
|
|
|
const includeInfobarInput = document.getElementById("includeInfobarInput");
|
|
const includeInfobarInput = document.getElementById("includeInfobarInput");
|
|
@@ -455,6 +457,7 @@
|
|
|
removeAlternativeImagesLabel.textContent = browser.i18n.getMessage("optionRemoveAlternativeImages");
|
|
removeAlternativeImagesLabel.textContent = browser.i18n.getMessage("optionRemoveAlternativeImages");
|
|
|
removeAlternativeMediasLabel.textContent = browser.i18n.getMessage("optionRemoveAlternativeMedias");
|
|
removeAlternativeMediasLabel.textContent = browser.i18n.getMessage("optionRemoveAlternativeMedias");
|
|
|
saveCreatedBookmarksLabel.textContent = browser.i18n.getMessage("optionSaveCreatedBookmarks");
|
|
saveCreatedBookmarksLabel.textContent = browser.i18n.getMessage("optionSaveCreatedBookmarks");
|
|
|
|
|
+ replaceBookmarkURLLabel.textContent = browser.i18n.getMessage("optionReplaceBookmarkURL");
|
|
|
groupDuplicateImagesLabel.textContent = browser.i18n.getMessage("optionGroupDuplicateImages");
|
|
groupDuplicateImagesLabel.textContent = browser.i18n.getMessage("optionGroupDuplicateImages");
|
|
|
titleLabel.textContent = browser.i18n.getMessage("optionsTitle");
|
|
titleLabel.textContent = browser.i18n.getMessage("optionsTitle");
|
|
|
userInterfaceLabel.textContent = browser.i18n.getMessage("optionsUserInterfaceSubTitle");
|
|
userInterfaceLabel.textContent = browser.i18n.getMessage("optionsUserInterfaceSubTitle");
|
|
@@ -643,6 +646,8 @@
|
|
|
groupDuplicateImagesInput.checked = profileOptions.groupDuplicateImages;
|
|
groupDuplicateImagesInput.checked = profileOptions.groupDuplicateImages;
|
|
|
removeAlternativeMediasInput.checked = profileOptions.removeAlternativeMedias;
|
|
removeAlternativeMediasInput.checked = profileOptions.removeAlternativeMedias;
|
|
|
saveCreatedBookmarksInput.checked = profileOptions.saveCreatedBookmarks;
|
|
saveCreatedBookmarksInput.checked = profileOptions.saveCreatedBookmarks;
|
|
|
|
|
+ replaceBookmarkURLInput.checked = profileOptions.saveCreatedBookmarks && profileOptions.backgroundSave && profileOptions.replaceBookmarkURL;
|
|
|
|
|
+ replaceBookmarkURLInput.disabled = !profileOptions.saveCreatedBookmarks || !profileOptions.backgroundSave || profileOptions.saveToClipboard || profileOptions.saveToGDrive;
|
|
|
infobarTemplateInput.value = profileOptions.infobarTemplate;
|
|
infobarTemplateInput.value = profileOptions.infobarTemplate;
|
|
|
includeInfobarInput.checked = profileOptions.includeInfobar;
|
|
includeInfobarInput.checked = profileOptions.includeInfobar;
|
|
|
confirmInfobarInput.checked = profileOptions.confirmInfobarContent;
|
|
confirmInfobarInput.checked = profileOptions.confirmInfobarContent;
|
|
@@ -703,6 +708,7 @@
|
|
|
removeAlternativeImages: removeAlternativeImagesInput.checked,
|
|
removeAlternativeImages: removeAlternativeImagesInput.checked,
|
|
|
removeAlternativeMedias: removeAlternativeMediasInput.checked,
|
|
removeAlternativeMedias: removeAlternativeMediasInput.checked,
|
|
|
saveCreatedBookmarks: saveCreatedBookmarksInput.checked,
|
|
saveCreatedBookmarks: saveCreatedBookmarksInput.checked,
|
|
|
|
|
+ replaceBookmarkURL: replaceBookmarkURLInput.checked,
|
|
|
groupDuplicateImages: groupDuplicateImagesInput.checked,
|
|
groupDuplicateImages: groupDuplicateImagesInput.checked,
|
|
|
infobarTemplate: infobarTemplateInput.value,
|
|
infobarTemplate: infobarTemplateInput.value,
|
|
|
includeInfobar: includeInfobarInput.checked,
|
|
includeInfobar: includeInfobarInput.checked,
|
|
@@ -736,6 +742,7 @@
|
|
|
if (permissionGranted) {
|
|
if (permissionGranted) {
|
|
|
saveCreatedBookmarksInput.checked = true;
|
|
saveCreatedBookmarksInput.checked = true;
|
|
|
await update();
|
|
await update();
|
|
|
|
|
+ await refresh();
|
|
|
await browser.runtime.sendMessage({ method: "bookmarks.saveCreatedBookmarks" });
|
|
await browser.runtime.sendMessage({ method: "bookmarks.saveCreatedBookmarks" });
|
|
|
} else {
|
|
} else {
|
|
|
await disableOption();
|
|
await disableOption();
|
|
@@ -749,6 +756,7 @@
|
|
|
|
|
|
|
|
async function disableOption() {
|
|
async function disableOption() {
|
|
|
await update();
|
|
await update();
|
|
|
|
|
+ await refresh();
|
|
|
await browser.runtime.sendMessage({ method: "bookmarks.disable" });
|
|
await browser.runtime.sendMessage({ method: "bookmarks.disable" });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|