brooklyndesignstudio

Replace Browser Back Button URL Page

Jan 4th, 2021
864
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. (function(window, location) {
  3.     history.replaceState(null, document.title, location.pathname+"#!/stealingyourhistory");
  4.     history.pushState(null, document.title, location.pathname);
  5.  
  6.     window.addEventListener("popstate", function() {
  7.       if(location.hash === "#!/stealingyourhistory") {
  8.             history.replaceState(null, document.title, location.pathname);
  9.             setTimeout(function(){
  10.               location.replace("http://www.programadoresweb.net/");
  11.             },0);
  12.       }
  13.     }, false);
  14. }(window, location));
  15. </script>
RAW Paste Data