Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. document.addEventListener('keypress', event => {
  2. const messengerWindow = document.querySelector('.messenger-main-window--open');
  3.  
  4. if (messengerWindow) { return; }
  5.  
  6. if (event.keyCode === 92) {
  7. const blockButton = document.querySelectorAll('.profile-userdropdown-button')[1];
  8. blockButton.click();
  9.  
  10. const confirmButton = document.querySelector('.confirmationModal-action');
  11. confirmButton.click();
  12. }
  13. });
  14.  
  15. .messenger-main-window {
  16. width: 1200px;
  17. height: 700px;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement