Remove Google Analytics

This commit is contained in:
magnolia1234 2020-01-12 18:50:12 +01:00 committed by GitHub
parent dfbb2be3ee
commit 295533ef2c

View File

@ -211,7 +211,7 @@ chrome.webRequest.onBeforeRequest.addListener(function (details) {
["blocking"]
);
**/
// Disable javascript for these sites/general paywall-scripts
chrome.webRequest.onBeforeRequest.addListener(function(details) {
if (!isSiteEnabled(details)) {
@ -378,16 +378,6 @@ chrome.webRequest.onCompleted.addListener(function(details) {
urls: ["<all_urls>"]
});
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-69824169-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = 'https://ssl.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
function isSiteEnabled(details) {
var isEnabled = enabledSites.some(function(enabledSite) {
var useSite = (details.url.indexOf("." + enabledSite) !== -1 || details.url.indexOf("/" + enabledSite) !== -1);