Select & Delete

deletes selected elements. shift+click: select or deselect, ctrl+click: delete.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Select & Delete
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  deletes selected elements. shift+click: select or deselect, ctrl+click: delete.
// @author       listfilterjay
// @match        *://*/*
// @grant        none
// @require      http://code.jquery.com/jquery-latest.min.js
// ==/UserScript==

(function() {
    'use strict';

    function clickCheck(e) {
        if(e.shiftKey||e.ctrlKey) {
            e.preventDefault(); // prevents links from opening.
            e.stopPropagation(); // prevents events from affecting parent elements.
            if(e.shiftKey) {
                console.log("shift");
                if(jQuery(this).hasClass("delete-select")) {
                    jQuery(this).removeClass("delete-select");
                }else {
                    jQuery(this).addClass("delete-select");
                }
            }
            if(e.ctrlKey) {
                console.log("ctrl");
                if(jQuery(this).hasClass("delete-select")) {
                    jQuery(this).remove();
                }
            }
        }
    }
    jQuery("*").click(clickCheck);

    // defintion of css for the red border around selected elements.
    const selectCss =
`<style type="text/css">
    .delete-select {
        border: 2px red solid !important;
    }
</style>`;
    jQuery(document.body).append(selectCss);
    console.log("select & delete script is active.");

})();