Skip to content

Commit

Permalink
feat: 增加恢复文本选择功能
Browse files Browse the repository at this point in the history
  • Loading branch information
yujinpan committed Aug 25, 2021
1 parent 7052e0e commit d21d273
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

> (如果有其他的需求或者问题,欢迎提出~)
## 恢复右键功能
## 恢复文本选择

### 主要功能
解除文本选择的禁用。

## 恢复右键功能

- 恢复右键原始的功能
恢复右键原始的功能

### 适用站点

Expand Down
15 changes: 15 additions & 0 deletions scripts/x-user-select.js
Original file line number Diff line number Diff line change
@@ -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; }';
})();

0 comments on commit d21d273

Please sign in to comment.