mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-23 03:57:48 +01:00
disable plausible by default
This commit is contained in:
parent
690b8e1304
commit
986ff0677c
1 changed files with 11 additions and 9 deletions
|
@ -17,21 +17,23 @@ if (style.styleSheet){
|
||||||
}
|
}
|
||||||
|
|
||||||
var script_tag = document.createElement('script');
|
var script_tag = document.createElement('script');
|
||||||
|
|
||||||
|
|
||||||
script_tag.type = 'text/javascript';
|
script_tag.type = 'text/javascript';
|
||||||
|
|
||||||
script_tag.text = localStorage.getItem("poke-custom-script");
|
script_tag.text = localStorage.getItem("poke-custom-script");
|
||||||
|
|
||||||
document.head.appendChild(script_tag);
|
document.head.appendChild(script_tag);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This script adds the Plausible analytics telemetry code to the page for the
|
* This script adds the Plausible analytics telemetry code to the page for the
|
||||||
* domain poketube.fun. The telemetry is opt-in by default, meaning that the
|
* domain poketube.fun.
|
||||||
* Plausible script will only be added if the user has not explicitly opted out
|
*/
|
||||||
* by setting the "plausible-enabled" key in local storage to "false".
|
|
||||||
*
|
var config = {}
|
||||||
* To opt out of telemetry, u can can set the "plausible-enabled" key to "false"
|
config.plausible_enabled = false
|
||||||
* in local storage. The data collected by Plausible is anonymous and aggregated,
|
|
||||||
* and no personal information is collected or stored.
|
if (window.location.hostname === "poketube.fun" && config.plausible_enabled == true) {
|
||||||
*/
|
|
||||||
if (window.location.hostname === "poketube.fun") {
|
|
||||||
const plausble_main = "https://telemetry.poketube.fun/js/p.js";
|
const plausble_main = "https://telemetry.poketube.fun/js/p.js";
|
||||||
const script = document.createElement("script");
|
const script = document.createElement("script");
|
||||||
const isTrackingEnabled = localStorage.getItem("plausible-enabled") !== "false";
|
const isTrackingEnabled = localStorage.getItem("plausible-enabled") !== "false";
|
||||||
|
|
Loading…
Reference in a new issue