-
-
Save dada-amater/2c2efabfb19f3a4a0b48f5b4de34062d 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