Force Double-Click to Close (No Exceptions)

Closes tab on ANY double-click, overriding all selection and input behaviors

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Force Double-Click to Close (No Exceptions)
// @namespace    http://tampermonkey.net/
// @version      1.5
// @description  Closes tab on ANY double-click, overriding all selection and input behaviors
// @author       Jerry
// @match        *://*/*
// @exclude     http://192.168.1.2:1030/*
// @grant        window.close
// @run-at       document-start
// @homepage    https://greasyfork.org/en/scripts/560949

// ==/UserScript==

(function() {
    'use strict';

    window.addEventListener('dblclick', function(e) {
        // 1. BLOCK EVERYTHING ELSE
        // Stop the browser from selecting text, zooming, or triggering button actions
        e.preventDefault();
        e.stopPropagation();
        e.stopImmediatePropagation();

        // 2. CLOSE IMMEDIATELY
        console.log("Force Close Triggered");
        window.close();
        
    }, true); // Capture phase (true) ensures we catch it before the page does

})();