mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Fix merge issues
This commit is contained in:
parent
0481943737
commit
d705610855
1 changed files with 3 additions and 26 deletions
|
@ -251,13 +251,9 @@ function activateTextChange(element) {
|
|||
let textBox = element.querySelector(".option-text-box");
|
||||
let option = element.getAttribute("sync-option");
|
||||
|
||||
textBox.value = SB.config[option];
|
||||
|
||||
<<<<<<< HEAD
|
||||
// See if anything extra must be done
|
||||
switch (option) {
|
||||
case "invidiousInstances":
|
||||
|
||||
let setButton = element.querySelector(".text-change-set");
|
||||
setButton.addEventListener("click", async function(e) {
|
||||
if (textBox.value.includes("/") || textBox.value.includes("http") || textBox.value.includes(":")) {
|
||||
|
@ -303,29 +299,10 @@ function activateTextChange(element) {
|
|||
return;
|
||||
}
|
||||
|
||||
chrome.storage.sync.get([option], function(result) {
|
||||
textBox.value = result[option];
|
||||
textBox.value = SB.config[option];
|
||||
|
||||
let setButton = element.querySelector(".text-change-set");
|
||||
setButton.addEventListener("click", (e) => setOptionValue(option, textBox.value));
|
||||
|
||||
element.querySelector(".option-hidden-section").classList.remove("hidden");
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when an option has been changed.
|
||||
*
|
||||
* @param {string} option
|
||||
* @param {*} value
|
||||
*/
|
||||
function setOptionValue(option, value, callback) {
|
||||
chrome.storage.sync.set({[option]: value}, callback);
|
||||
}
|
||||
=======
|
||||
let setButton = element.querySelector(".text-change-set");
|
||||
setButton.addEventListener("click", () => {SB.config[option] = textBox.value});
|
||||
|
||||
element.querySelector(".option-hidden-section").classList.remove("hidden");
|
||||
}
|
||||
>>>>>>> c53bc202941f8dbf2f5481a891ca28a69825304b
|
||||
|
|
Loading…
Reference in a new issue