Force Double-Click to Close (No Exceptions)

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

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

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

})();