mirror of
https://github.com/safing/web
synced 2025-04-17 09:29:08 +00:00
Merge pull request #219 from safing/fix/plausible-tag-removal
Fix removal of source query parameter
This commit is contained in:
commit
61819dbbdb
1 changed files with 6 additions and 4 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue