Created
February 17, 2017 04:08
-
-
Save DKunin/e1be4bcde3e227f541246aabbc66ce75 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Yandex Disk delete shortcut | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author DKunin | |
// @match https://disk.yandex.ru/client/disk/* | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
document.body.addEventListener('keydown', (event) => { | |
if(event.key === 'Backspace' && event.metaKey) { | |
document.querySelector('[data-click-action="resource.delete"]').click(); | |
}; | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment