Force Double-Click to Close (No Exceptions)

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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

})();