mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-14 05:09:00 +01:00
add GPC
This commit is contained in:
parent
cfcc417fa5
commit
7fc4c75ae0
1 changed files with 8 additions and 0 deletions
|
@ -208,6 +208,12 @@ function fetchUrls(urls) {
|
||||||
return hash.toString(CryptoJS.enc.Hex);
|
return hash.toString(CryptoJS.enc.Hex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(navigator.globalPrivacyControl) {
|
||||||
|
var gpcValue = navigator?.globalPrivacyControl
|
||||||
|
} else {
|
||||||
|
var gpcValue = false
|
||||||
|
}
|
||||||
|
|
||||||
if (location.hostname === "poketube.fun") {
|
if (location.hostname === "poketube.fun") {
|
||||||
if (typeof Ashley === "undefined") {
|
if (typeof Ashley === "undefined") {
|
||||||
var Ashley = {};
|
var Ashley = {};
|
||||||
|
@ -245,6 +251,7 @@ function fetchUrls(urls) {
|
||||||
return dntStatus === "Enabled" ? true : false;
|
return dntStatus === "Enabled" ? true : false;
|
||||||
};
|
};
|
||||||
// only load if DNT is not enabled
|
// only load if DNT is not enabled
|
||||||
|
if(!gpcValue) {
|
||||||
if (Ashley && !Ashley.dntEnabled()) {
|
if (Ashley && !Ashley.dntEnabled()) {
|
||||||
var _paq = (window._paq = window._paq || []);
|
var _paq = (window._paq = window._paq || []);
|
||||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||||
|
@ -271,6 +278,7 @@ function fetchUrls(urls) {
|
||||||
})();
|
})();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var popupMenu = document.getElementById("popupMenu");
|
var popupMenu = document.getElementById("popupMenu");
|
||||||
var loopOption = document.getElementById("loopOption");
|
var loopOption = document.getElementById("loopOption");
|
||||||
|
|
Loading…
Reference in a new issue