Skip to content

Instantly share code, notes, and snippets.

@Micorksen
Last active February 12, 2023 21:56
Show Gist options
  • Save Micorksen/a6c0ab4dcafdfc8ee9cfdc3b7f3f3cd1 to your computer and use it in GitHub Desktop.
Save Micorksen/a6c0ab4dcafdfc8ee9cfdc3b7f3f3cd1 to your computer and use it in GitHub Desktop.
Disable Plausible tracking.
// ==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