}; var origReplace = history.replaceState; history.replaceState = function() { if (arguments[2] && String(arguments[2]).indexOf("#settings") === 0) { arguments[2] = location.pathname; } return origReplace.apply(this, arguments); }; })();