Skip to content

Instantly share code, notes, and snippets.

@DKunin
Created February 17, 2017 04:08
Show Gist options
  • Save DKunin/e1be4bcde3e227f541246aabbc66ce75 to your computer and use it in GitHub Desktop.
Save DKunin/e1be4bcde3e227f541246aabbc66ce75 to your computer and use it in GitHub Desktop.
// ==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();
};
});
})();
@Korb
Copy link

Korb commented Sep 28, 2022

What exactly does this script do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment