您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Tracks the number of copied characters and displays it on the webpage
当前为
// ==UserScript== // @name 统计选中字符数量(Powered By GPT) Character Count Tracker // @namespace http://your.namespace.com // @version 1.0 // @description Tracks the number of copied characters and displays it on the webpage // @match http://*/* // @match https://*/* // @grant none // author 韩立 // ==/UserScript== (function() { // Create a container element to hold the character count var charCountContainer = document.createElement('div'); charCountContainer.style.cssText = 'position: fixed; bottom: 10px; right: 10px;'; // Create a span element to display the character count var charCountDisplay = document.createElement('span'); charCountDisplay.style.cssText = 'background-color: #fff; padding: 5px;'; // Add the display element to the container charCountContainer.appendChild(charCountDisplay); // Append the container to the document body document.body.appendChild(charCountContainer); var previousCharCount = 0; function updateCharCount() { var selectedText = window.getSelection().toString(); var charCount = selectedText.length; if (charCount > 0) { // Display the character count if text is selected charCountDisplay.textContent = '选中字符: ' + charCount; charCountContainer.style.display = 'block'; if (charCount !== previousCharCount) { // Character count has changed, do something here if needed previousCharCount = charCount; } } else { // Hide the character count if no text is selected charCountContainer.style.display = 'none'; previousCharCount = 0; } } // Listen for selection change events document.addEventListener('mouseup', updateCharCount); document.addEventListener('touchend', updateCharCount); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址