mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 04:01:58 +01:00
Update daily users counter (amo)
This commit is contained in:
parent
7ebbbdc9e6
commit
cf4070cbf0
4 changed files with 36 additions and 2 deletions
|
@ -32,4 +32,7 @@ function currentDateStr() {
|
|||
}
|
||||
var last_date_str = currentDateStr();
|
||||
var daily_users;
|
||||
bpc_count_daily_users(last_date_str);
|
||||
ext_api.storage.local.get({counter: true}, function (result) {
|
||||
if (result.counter)
|
||||
bpc_count_daily_users(last_date_str);
|
||||
});
|
||||
|
|
|
@ -9,6 +9,7 @@ Fix Foreign Affairs (timing)
|
|||
Fix Medium (cookies)
|
||||
Fix Telerama.fr (mobile)
|
||||
Fix VeloNews
|
||||
Update daily users counter (amo)
|
||||
|
||||
* v2.3.7.0 (2021-09-26)
|
||||
Add Aachener Zeitung (Germany)
|
||||
|
|
|
@ -32,6 +32,15 @@
|
|||
<button id="custom-disable">Disable</button>
|
||||
</div>
|
||||
<p>You can also just request permissions for the <a href="../options_custom.html">custom sites</a> you added yourself.</p>
|
||||
</div>
|
||||
<div id="counter-prompt">
|
||||
<p><strong>daily users counter opt-in</strong></p>
|
||||
<p>Very basic daily users counter (by counting the download of an empty json-file (no personal information is shared)):</br>
|
||||
<p>daily users counter enabled: <span id="counter-enabled"></span></p>
|
||||
<div id="custom-container">
|
||||
<button id="counter-enable">Enable</button>
|
||||
<button id="counter-disable">Disable</button>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<div style='float:left;padding-bottom:50px'>
|
||||
|
|
|
@ -75,4 +75,25 @@ window.addEventListener("load", function () {
|
|||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
var counter_enabled = document.getElementById('counter-enabled');
|
||||
ext_api.storage.local.get({counter: true}, function (result) {
|
||||
counter_enabled.innerText = result.counter ? 'YES' : 'NO';
|
||||
});
|
||||
|
||||
document.getElementById("counter-enable").addEventListener("click", function () {
|
||||
ext_api.storage.local.set({
|
||||
"counter": true,
|
||||
"optInShown": true
|
||||
});
|
||||
counter_enabled.innerText = 'YES';
|
||||
});
|
||||
|
||||
document.getElementById("counter-disable").addEventListener("click", function () {
|
||||
ext_api.storage.local.set({
|
||||
"counter": false,
|
||||
"optInShown": true
|
||||
});
|
||||
counter_enabled.innerText = 'NO';
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue