Update opt-in tab (default settings)

merge-requests/1/head
magnolia1234 4 years ago
parent 6b9bfc9dc5
commit f49603502d

@ -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
});
}
});

@ -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">

@ -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();
});

Loading…
Cancel
Save