Advertisement
Guest User

Untitled

a guest
Feb 21st, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. //Mouse Special back buttons trap code start
  2. function PreventBrowserBack(){
  3. window.location.hash="1";
  4. window.location.hash="2";
  5. }
  6.  
  7. PreventBrowserBack();
  8.  
  9. $(window).on('hashchange', function() {
  10. window.location.hash="1";
  11.  
  12. });
  13.  
  14. function ApproveBrowserBack(){
  15. window.location.hash="1";
  16. window.location.hash="2";
  17. }
  18. //Mouse Special back buttons trap code End
  19. document.onmousedown = function disableclick(event){
  20. if(event.button==2)
  21. {
  22. alert("Right Click is not allowed");
  23. return false;
  24. }
  25. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement