1
0
Fork 0
mirror of https://github.com/safing/web synced 2025-04-17 09:29:08 +00:00

Merge pull request from safing/fix/plausible-tag-removal

Fix removal of source query parameter
This commit is contained in:
Daniel 2022-08-17 16:33:29 +02:00 committed by GitHub
commit 61819dbbdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,8 +17,10 @@
Here are some keywords, so that everyone who is curious will find this code snippet faster:
plausible, analysis, analytics, campaign, tracking, query, hash, URL, #disabled?source=
-->
<script defer>
if (document.location.search !== "") {
window.history.replaceState({}, document.title, document.location.pathname + "#disabled" + document.location.search);
}
<script>
document.addEventListener('DOMContentLoaded', (event) => {
if (document.location.search !== "") {
window.history.replaceState({}, document.title, document.location.pathname + "#disabled" + document.location.search);
}
});
</script>