|
@@ -64,6 +64,7 @@ const autoSaveDelayLabel = document.getElementById("autoSaveDelayLabel");
|
|
|
const autoSaveLoadLabel = document.getElementById("autoSaveLoadLabel");
|
|
const autoSaveLoadLabel = document.getElementById("autoSaveLoadLabel");
|
|
|
const autoSaveUnloadLabel = document.getElementById("autoSaveUnloadLabel");
|
|
const autoSaveUnloadLabel = document.getElementById("autoSaveUnloadLabel");
|
|
|
const autoSaveLoadOrUnloadLabel = document.getElementById("autoSaveLoadOrUnloadLabel");
|
|
const autoSaveLoadOrUnloadLabel = document.getElementById("autoSaveLoadOrUnloadLabel");
|
|
|
|
|
+const autoSaveDiscardLabel = document.getElementById("autoSaveDiscardLabel");
|
|
|
const autoSaveRepeatLabel = document.getElementById("autoSaveRepeatLabel");
|
|
const autoSaveRepeatLabel = document.getElementById("autoSaveRepeatLabel");
|
|
|
const autoSaveRepeatDelayLabel = document.getElementById("autoSaveRepeatDelayLabel");
|
|
const autoSaveRepeatDelayLabel = document.getElementById("autoSaveRepeatDelayLabel");
|
|
|
const autoSaveExternalSaveLabel = document.getElementById("autoSaveExternalSaveLabel");
|
|
const autoSaveExternalSaveLabel = document.getElementById("autoSaveExternalSaveLabel");
|
|
@@ -146,6 +147,7 @@ const backgroundSaveInput = document.getElementById("backgroundSaveInput");
|
|
|
const autoSaveDelayInput = document.getElementById("autoSaveDelayInput");
|
|
const autoSaveDelayInput = document.getElementById("autoSaveDelayInput");
|
|
|
const autoSaveLoadInput = document.getElementById("autoSaveLoadInput");
|
|
const autoSaveLoadInput = document.getElementById("autoSaveLoadInput");
|
|
|
const autoSaveUnloadInput = document.getElementById("autoSaveUnloadInput");
|
|
const autoSaveUnloadInput = document.getElementById("autoSaveUnloadInput");
|
|
|
|
|
+const autoSaveDiscardInput = document.getElementById("autoSaveDiscardInput");
|
|
|
const autoSaveLoadOrUnloadInput = document.getElementById("autoSaveLoadOrUnloadInput");
|
|
const autoSaveLoadOrUnloadInput = document.getElementById("autoSaveLoadOrUnloadInput");
|
|
|
const autoSaveRepeatInput = document.getElementById("autoSaveRepeatInput");
|
|
const autoSaveRepeatInput = document.getElementById("autoSaveRepeatInput");
|
|
|
const autoSaveRepeatDelayInput = document.getElementById("autoSaveRepeatDelayInput");
|
|
const autoSaveRepeatDelayInput = document.getElementById("autoSaveRepeatDelayInput");
|
|
@@ -355,19 +357,24 @@ importButton.addEventListener("click", () => {
|
|
|
fileInput.click();
|
|
fileInput.click();
|
|
|
}, false);
|
|
}, false);
|
|
|
autoSaveUnloadInput.addEventListener("click", async () => {
|
|
autoSaveUnloadInput.addEventListener("click", async () => {
|
|
|
- if (!autoSaveLoadInput.checked && !autoSaveUnloadInput.checked) {
|
|
|
|
|
|
|
+ if (!autoSaveLoadInput.checked && !autoSaveUnloadInput.checked && !autoSaveDiscardInput.checked) {
|
|
|
autoSaveLoadOrUnloadInput.checked = true;
|
|
autoSaveLoadOrUnloadInput.checked = true;
|
|
|
}
|
|
}
|
|
|
}, false);
|
|
}, false);
|
|
|
autoSaveLoadInput.addEventListener("click", async () => {
|
|
autoSaveLoadInput.addEventListener("click", async () => {
|
|
|
- if (!autoSaveLoadInput.checked && !autoSaveUnloadInput.checked) {
|
|
|
|
|
|
|
+ if (!autoSaveLoadInput.checked && !autoSaveUnloadInput.checked && !autoSaveDiscardInput.checked) {
|
|
|
|
|
+ autoSaveLoadOrUnloadInput.checked = true;
|
|
|
|
|
+ }
|
|
|
|
|
+}, false);
|
|
|
|
|
+autoSaveDiscardInput.addEventListener("click", async () => {
|
|
|
|
|
+ if (!autoSaveLoadInput.checked && !autoSaveUnloadInput.checked && !autoSaveDiscardInput.checked) {
|
|
|
autoSaveLoadOrUnloadInput.checked = true;
|
|
autoSaveLoadOrUnloadInput.checked = true;
|
|
|
}
|
|
}
|
|
|
}, false);
|
|
}, false);
|
|
|
autoSaveLoadOrUnloadInput.addEventListener("click", async () => {
|
|
autoSaveLoadOrUnloadInput.addEventListener("click", async () => {
|
|
|
if (autoSaveLoadOrUnloadInput.checked) {
|
|
if (autoSaveLoadOrUnloadInput.checked) {
|
|
|
autoSaveUnloadInput.checked = autoSaveLoadInput.checked = false;
|
|
autoSaveUnloadInput.checked = autoSaveLoadInput.checked = false;
|
|
|
- } else {
|
|
|
|
|
|
|
+ } else if (!autoSaveDiscardInput.checked) {
|
|
|
autoSaveUnloadInput.checked = false;
|
|
autoSaveUnloadInput.checked = false;
|
|
|
autoSaveLoadInput.checked = true;
|
|
autoSaveLoadInput.checked = true;
|
|
|
}
|
|
}
|
|
@@ -483,6 +490,7 @@ autoSaveDelayLabel.textContent = browser.i18n.getMessage("optionAutoSaveDelay");
|
|
|
autoSaveLoadLabel.textContent = browser.i18n.getMessage("optionAutoSaveLoad");
|
|
autoSaveLoadLabel.textContent = browser.i18n.getMessage("optionAutoSaveLoad");
|
|
|
autoSaveUnloadLabel.textContent = browser.i18n.getMessage("optionAutoSaveUnload");
|
|
autoSaveUnloadLabel.textContent = browser.i18n.getMessage("optionAutoSaveUnload");
|
|
|
autoSaveLoadOrUnloadLabel.textContent = browser.i18n.getMessage("optionAutoSaveLoadOrUnload");
|
|
autoSaveLoadOrUnloadLabel.textContent = browser.i18n.getMessage("optionAutoSaveLoadOrUnload");
|
|
|
|
|
+autoSaveDiscardLabel.textContent = browser.i18n.getMessage("optionAutoSaveDiscard");
|
|
|
autoSaveRepeatLabel.textContent = browser.i18n.getMessage("optionAutoSaveRepeat");
|
|
autoSaveRepeatLabel.textContent = browser.i18n.getMessage("optionAutoSaveRepeat");
|
|
|
autoSaveRepeatDelayLabel.textContent = browser.i18n.getMessage("optionAutoSaveRepeatDelay");
|
|
autoSaveRepeatDelayLabel.textContent = browser.i18n.getMessage("optionAutoSaveRepeatDelay");
|
|
|
autoSaveExternalSaveLabel.textContent = browser.i18n.getMessage("optionAutoSaveExternalSave");
|
|
autoSaveExternalSaveLabel.textContent = browser.i18n.getMessage("optionAutoSaveExternalSave");
|
|
@@ -685,6 +693,7 @@ async function refresh(profileName) {
|
|
|
autoSaveUnloadInput.checked = !profileOptions.autoSaveLoadOrUnload && profileOptions.autoSaveUnload;
|
|
autoSaveUnloadInput.checked = !profileOptions.autoSaveLoadOrUnload && profileOptions.autoSaveUnload;
|
|
|
autoSaveLoadInput.disabled = profileOptions.autoSaveLoadOrUnload;
|
|
autoSaveLoadInput.disabled = profileOptions.autoSaveLoadOrUnload;
|
|
|
autoSaveUnloadInput.disabled = profileOptions.autoSaveLoadOrUnload;
|
|
autoSaveUnloadInput.disabled = profileOptions.autoSaveLoadOrUnload;
|
|
|
|
|
+ autoSaveDiscardInput.checked = profileOptions.autoSaveDiscard;
|
|
|
autoSaveRepeatInput.checked = profileOptions.autoSaveRepeat;
|
|
autoSaveRepeatInput.checked = profileOptions.autoSaveRepeat;
|
|
|
autoSaveRepeatInput.disabled = !profileOptions.autoSaveLoadOrUnload && !profileOptions.autoSaveLoad;
|
|
autoSaveRepeatInput.disabled = !profileOptions.autoSaveLoadOrUnload && !profileOptions.autoSaveLoad;
|
|
|
autoSaveRepeatDelayInput.value = profileOptions.autoSaveRepeatDelay;
|
|
autoSaveRepeatDelayInput.value = profileOptions.autoSaveRepeatDelay;
|
|
@@ -758,6 +767,7 @@ async function update() {
|
|
|
autoSaveDelay: Math.max(autoSaveDelayInput.value, 0),
|
|
autoSaveDelay: Math.max(autoSaveDelayInput.value, 0),
|
|
|
autoSaveLoad: autoSaveLoadInput.checked,
|
|
autoSaveLoad: autoSaveLoadInput.checked,
|
|
|
autoSaveUnload: autoSaveUnloadInput.checked,
|
|
autoSaveUnload: autoSaveUnloadInput.checked,
|
|
|
|
|
+ autoSaveDiscard: autoSaveDiscardInput.checked,
|
|
|
autoSaveLoadOrUnload: autoSaveLoadOrUnloadInput.checked,
|
|
autoSaveLoadOrUnload: autoSaveLoadOrUnloadInput.checked,
|
|
|
autoSaveRepeat: autoSaveRepeatInput.checked,
|
|
autoSaveRepeat: autoSaveRepeatInput.checked,
|
|
|
autoSaveRepeatDelay: Math.max(autoSaveRepeatDelayInput.value, 1),
|
|
autoSaveRepeatDelay: Math.max(autoSaveRepeatDelayInput.value, 1),
|