Pure Text Copy

This script disables the automatic source insertion function when copying text.

Zainstaluj skrypt?
Skrypt zaproponowany przez autora

Może Ci się również spodobać. Selection and Copying Restorer (Universal)

Zainstaluj skrypt

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

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

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         Pure Text Copy
// @namespace    Pure Text Copy
// @version      1.0.0
// @description  This script disables the automatic source insertion function when copying text.
// @author       DumbGPT
// @match        *://*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    
    document.addEventListener('copy', function(event) {
        const selection = window.getSelection();
        
        if (selection && selection.toString().length > 0) {
            event.preventDefault();
            
            const pureText = selection.toString();
            
            event.clipboardData.setData('text/plain', pureText);
        }
    }, true);
    
    function showCopyNotification() {
        const notification = document.createElement('div');
        
        const container = document.createElement('div');
        container.style.cssText = 'display: flex; align-items: center;';
        
        const icon = document.createElement('span');
        icon.innerHTML = '✓';
        icon.style.cssText = 'display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; background-color: #4CAF50; border-radius: 50%; margin-right: 10px; font-size: 12px; color: white;';
        
        const text = document.createElement('span');
        text.textContent = 'Text Copied';
        text.style.cssText = 'font-family: "Segoe UI", Arial, sans-serif; font-weight: 500;';
        
        container.appendChild(icon);
        container.appendChild(text);
        notification.appendChild(container);
        
        notification.style.cssText = `
            position: fixed;
            bottom: 20px;
            right: 20px;
            background-color: rgba(255, 255, 255, 0.95);
            color: #333;
            padding: 12px 16px;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            z-index: 9999;
            opacity: 0;
            transform: translateY(10px);
            transition: opacity 0.3s, transform 0.3s;
        `;
        
        document.body.appendChild(notification);
        
        setTimeout(() => {
            notification.style.opacity = '1';
            notification.style.transform = 'translateY(0)';
        }, 10);
        
        setTimeout(() => {
            notification.style.opacity = '0';
            notification.style.transform = 'translateY(10px)';
            setTimeout(() => {
                document.body.removeChild(notification);
            }, 300);
        }, 2000);
    }
    
    document.addEventListener('copy', () => showCopyNotification(), false);
})();