您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Provides a visual feedback when you copy text using Ctrl+C.
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.
Ctrl+C
.@match *://*/*
directive.Before installing this script, you need to have a user script manager installed in your web browser. The most popular one is Tampermonkey.
+
tab to open the new script editor.copy-feedback.user.js
file and paste it into the editor, replacing any default code.The script is now installed and will be active on all websites you visit.
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.
You can easily tweak the script to change how the notification looks or behaves.
To edit the script:
Find this line:
feedbackElement.textContent = 'Copied to clipboard!';
And change the text to whatever you prefer:
feedbackElement.textContent = 'Text successfully copied!';
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'
});
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".
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址