Force Text Copying Enhanced

Force-enable text copying across more browsers

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

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 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.

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

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 Text Copying Enhanced
// @namespace    https://viayoo.com/
// @version      0.2
// @description  Force-enable text copying across more browsers
// @author       You
// @run-at       document-end
// @match        https://*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Apply user-select: text to all elements with different prefixes and standard property
    document.querySelectorAll("*").forEach(function(el) {
        el.style.webkitUserSelect = 'text'; // For WebKit browsers (Chrome, Safari) [cite: 2]
        el.style.mozUserSelect = 'text';    // For Firefox
        el.style.msUserSelect = 'text';     // For Internet Explorer/Edge (older versions)
        el.style.userSelect = 'text';       // Standard property
    });

    // --- Optional: Attempt to re-enable copy/cut events ---
    // This part is more complex and might not work on all sites or could cause unintended side effects.
    // Use with caution and test thoroughly.

    /*
    document.addEventListener('copy', enableCopy);
    document.addEventListener('cut', enableCopy);
    document.addEventListener('selectstart', enableCopy);

    function enableCopy(e) {
        e.stopPropagation(); // Stop the event from propagating up the DOM tree
        // In some cases, you might need to explicitly set the clipboard data,
        // but stopping propagation is often enough to prevent sites from blocking the default action.
    }
    */

})();