Visible Copy Confirmation Feedback

Provides a visual feedback when you copy text using Ctrl+C.

Autor
Donff Roodus
Dziennych instalacji
0
Wszystkich instalacji
1
Oceny
0 0 0
Wersja
1.0.1
Utworzono
10-06-2025
Zaktualizowano
11-06-2025
Rozmiar
1,56 KB
Licencja
MIT
Dotyczy
Wszystkie strony

Copy Confirmation Feedback Script

A simple Tampermonkey user script that provides visual feedback whenever you copy text using the Ctrl+C keyboard shortcut. This script helps you confirm that your copy action was successful without needing to repeatedly press the keys.


Features

  • Instant Feedback: A sleek notification appears immediately upon pressing Ctrl+C.
  • Universal Application: Works on all websites thanks to the @match *://*/* directive.
  • Lightweight: Minimal and clean code that doesn't slow down your Browse experience.
  • Easy to Customize: The appearance, position, and duration of the feedback message can be easily modified by editing the script's CSS and JavaScript.

Prerequisites

Before installing this script, you need to have a user script manager installed in your web browser. The most popular one is Tampermonkey.

  • Tampermonkey (for Chrome, Microsoft Edge, Safari, Firefox, and other compatible browsers)

Installation

  1. Install a user script manager if you don't already have one (see Prerequisites above).
  2. Open the Tampermonkey Dashboard: Click on the Tampermonkey icon in your browser's toolbar and select "Dashboard".
  3. Create a New Script: Click on the + tab to open the new script editor.
  4. Add the Code: Copy the entire code from the copy-feedback.user.js file and paste it into the editor, replacing any default code.
  5. Save the Script: Go to the "File" menu in the editor and click "Save".

The script is now installed and will be active on all websites you visit.


How to Use

Once the script is installed and enabled, simply navigate to any webpage and press Ctrl+C to copy some text. A confirmation message will briefly appear in the top-right corner of your screen, confirming that the copy command was triggered.


Customization

You can easily tweak the script to change how the notification looks or behaves.

To edit the script:

  1. Go to the Tampermonkey Dashboard.
  2. Click on the script name "Copy Confirmation Feedback".
  3. Modify the code in the editor.

Examples of Customization:

Change the Feedback Text:

Find this line:

feedbackElement.textContent = 'Copied to clipboard!';

And change the text to whatever you prefer:

feedbackElement.textContent = 'Text successfully copied!';

Change the Position and Colors:

The visual styling is controlled by the Object.assign(feedbackElement.style, { ... }); block. You can change these CSS properties. For example, to move it to the bottom-left corner and make it blue:

Object.assign(feedbackElement.style, {
    position: 'fixed',
    bottom: '20px',         // Changed from 'top'
    left: '20px',           // Changed from 'right'
    backgroundColor: '#007BFF', // Changed from green to blue
    color: 'white',
    padding: '15px',
    borderRadius: '5px',
    zIndex: '9999',
    fontSize: '16px',
    opacity: '0',
    transition: 'opacity 0.5s'
});

Change the Duration:

The notification is visible for 2 seconds (2000 milliseconds). To change this, modify the value in the setTimeout function:

setTimeout(() => {
    feedbackElement.style.opacity = '0';
    // ...
}, 3000); // Changed from 2000 to 3000 (3 seconds)

After making your changes, remember to go to "File" -> "Save".