Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- document.addEventListener('keypress', event => {
- const messengerWindow = document.querySelector('.messenger-main-window--open');
- if (messengerWindow) { return; }
- if (event.keyCode === 92) {
- const blockButton = document.querySelectorAll('.profile-userdropdown-button')[1];
- blockButton.click();
- const confirmButton = document.querySelector('.confirmationModal-action');
- confirmButton.click();
- }
- });
- .messenger-main-window {
- width: 1200px;
- height: 700px;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement