Update opt-in tab (default settings)

This commit is contained in:
magnolia1234 2020-10-15 08:35:41 +02:00
parent 6b9bfc9dc5
commit f49603502d
3 changed files with 10 additions and 5 deletions

View file

@ -802,6 +802,10 @@ ext_api.storage.sync.get(["optInShown", "customShown"], function (result) {
ext_api.tabs.create({
url: "optin/opt-in.html"
});
ext_api.storage.sync.set({
"optInShown": true,
"customShown": true
});
}
});

View file

@ -19,8 +19,8 @@
The Belfast Telegraph</p>
<p>setCookie opt-in enabled: <span id="opt-in-enabled"></span></p>
<div id="optin-container">
<button id="button-enable">Enable</button>
<button id="button-cancel" autofocus="true">Disable</button>
<button id="optin-enable">Enable</button>
<button id="optin-disable">Disable</button>
</div>
</div>
<div id="custom-prompt">

View file

@ -7,7 +7,7 @@ window.addEventListener("load", function () {
opt_in_enabled.innerText = result.optIn ? 'YES' : 'NO';
});
document.getElementById("button-enable").addEventListener(
document.getElementById("optin-enable").addEventListener(
"click",
function () {
ext_api.storage.sync.set({
@ -20,7 +20,7 @@ window.addEventListener("load", function () {
}, 800);
});
document.getElementById("button-cancel").addEventListener(
document.getElementById("optin-disable").addEventListener(
"click",
function () {
ext_api.storage.sync.set({
@ -37,7 +37,8 @@ window.addEventListener("load", function () {
"click",
function () {
ext_api.storage.sync.set({
"optInShown": true
"optInShown": true,
"customShown": true
});
window.close();
});