From d21d27310eb8045790d160d59a252a81915a4682 Mon Sep 17 00:00:00 2001 From: yujinpan <1192878390@qq.com> Date: Wed, 25 Aug 2021 11:28:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E9=80=89=E6=8B=A9=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 +++++--- scripts/x-user-select.js | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 scripts/x-user-select.js diff --git a/README.md b/README.md index a550347..8f89dd8 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,13 @@ > (如果有其他的需求或者问题,欢迎提出~) -## 恢复右键功能 +## 恢复文本选择 -### 主要功能 +解除文本选择的禁用。 + +## 恢复右键功能 -- 恢复右键原始的功能 +恢复右键原始的功能。 ### 适用站点 diff --git a/scripts/x-user-select.js b/scripts/x-user-select.js new file mode 100644 index 0000000..a8efcea --- /dev/null +++ b/scripts/x-user-select.js @@ -0,0 +1,15 @@ +// ==UserScript== +// @name 恢复文本选择 +// @namespace https://github.com/yujinpan/tampermonkey-extension +// @version 1.0 +// @license MIT +// @description 解除文本选择的禁用。 +// @author yujinpan +// @include http*://** +// @run-at document-start +// ==/UserScript== + +(() => { + const style = document.createElement('style'); + style.innerHTML = '*,*::after,*::before { user-select: auto !important; }'; +})(); \ No newline at end of file