diff --git a/background.js b/background.js index a8136da5..74d1ee8d 100644 --- a/background.js +++ b/background.js @@ -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 + }); } }); diff --git a/optin/opt-in.html b/optin/opt-in.html index 31a4d317..f192c78c 100644 --- a/optin/opt-in.html +++ b/optin/opt-in.html @@ -19,8 +19,8 @@ The Belfast Telegraph

setCookie opt-in enabled:

- - + +
diff --git a/optin/opt-in.js b/optin/opt-in.js index c817291c..f7308e42 100644 --- a/optin/opt-in.js +++ b/optin/opt-in.js @@ -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(); });