Skip to content

Instantly share code, notes, and snippets.

@0xDaksh
Last active May 9, 2017 11:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0xDaksh/ca895d460f53610b406a3446de366847 to your computer and use it in GitHub Desktop.
Save 0xDaksh/ca895d460f53610b406a3446de366847 to your computer and use it in GitHub Desktop.
Traffic Redirect Script, Redirect your traffic when user clicks back button to another url :3
var urlToSend = 'https://dak.sh'; // change this shit :3
jQuery(document).ready(function($) {
if (window.history && window.history.pushState) {
window.history.pushState('forward', null, './#here');
$(window).on('popstate', function() {
window.location = urlToSend;
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment