Created
April 20, 2017 12:46
-
-
Save milo/2b14b9e7855f1956dd8c6d311d9b2a3c to your computer and use it in GitHub Desktop.
Flash message _fid parameter remove.
This file contains 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
(function (w, timeout) { | |
setTimeout(function () { | |
var url = w.location.toString(); | |
if (w.history && w.history.replaceState && url.indexOf('_fid=') !== -1) { | |
w.history.replaceState({}, null, /[?&]_fid=[^&]+$/.test(url) | |
? url.replace(/[?&]_fid=[^&]+/, '') | |
: url.replace(/([?&])_fid=[^&]+&/, '$1') | |
); | |
} | |
}, timeout || 2000); | |
})(window); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment