Last active
July 25, 2025 16:54
-
-
Save rudiedirkx/fd568b08d7bffd6bd372 to your computer and use it in GitHub Desktop.
Revisions
-
rudiedirkx revised this gist
Jun 15, 2023 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,8 @@ var _wr = function(type) { return rv; }; }; history.pushState = _wr('pushState'); history.replaceState = _wr('replaceState'); -
rudiedirkx created this gist
Sep 4, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ var _wr = function(type) { var orig = history[type]; return function() { var rv = orig.apply(this, arguments); var e = new Event(type); e.arguments = arguments; window.dispatchEvent(e); return rv; }; }; history.pushState = _wr('pushState'), history.replaceState = _wr('replaceState'); window.addEventListener('replaceState', function(e) { if ( location.href.match(/[&?]ref_=/) ) { console.warn('THOSE FUCKERS GAVE ME A ?_ref AGAIN!'); } });