Last active
February 12, 2023 21:56
-
-
Save Micorksen/a6c0ab4dcafdfc8ee9cfdc3b7f3f3cd1 to your computer and use it in GitHub Desktop.
Disable Plausible tracking.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Plausible | |
// @namespace https://micorksen.eu | |
// @version 1.0 | |
// @description Disable Plausible tracking. | |
// @author Micorksen | |
// @match http://*/* | |
// @match https://*/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=plausible.io | |
// @grant none | |
// ==/UserScript== | |
(function () { | |
'use strict' | |
window.localStorage.plausible_ignore = window.localStorage.plausible_ignore || 'true' | |
let k = 0 | |
const s = window.atob('cGxhdXNpYmxl') | |
document.addEventListener('keypress', function (e) { | |
if (s.charCodeAt(k) === e.keyCode) { | |
k++ | |
if (k === s.length) { | |
window.localStorage.plausible_ignore = !(window.localStorage.plausible_ignore === 'true') | |
k = 0 | |
window.location.reload() | |
} | |
} else { | |
k = 0 | |
} | |
}) | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment