您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Allows highlighting and copying text on websites where it might be disabled by overriding CSS and removing common disabling attributes.
README: CopyAnything Greasemonkey Script
This is a user script designed for Greasemonkey, Tampermonkey, and similar browser extensions. Its purpose is to overcome common restrictions imposed by websites that prevent users from highlighting, selecting, or copying text.
The script employs a multi-pronged approach to ensure text selection and copying are enabled:
!important
declarations that force all elements on the webpage to have user-select: text
. This overrides any styles set by the website that might try to disable text selection (e.g., user-select: none
). It includes vendor prefixes (-webkit-
, -moz-
, -ms-
) for broader browser compatibility.onselectstart
: Prevents text selection from starting.ondragstart
: Prevents elements from being dragged, which can sometimes interfere with text selection.oncontextmenu
: Prevents the right-click context menu from appearing, which often contains the "Copy" option.MutationObserver
to continuously monitor the webpage for changes. If new elements are added to the DOM or existing elements have their attributes modified, the script automatically applies the CSS overrides and removes disabling attributes to the new or changed content in real-time.To use this script, you'll need a user script manager extension installed in your web browser. Popular options include:
greasemonkey-text-enabler.js
script and paste it into the editor.File > Save
or Ctrl+S
/Cmd+S
).Script made by Aditya Mendiratta