Greasy Fork

来自缓存

Greasy Fork is available in English.

解除复制限制

解除网站的禁止复制功能,保留右键菜单

// ==UserScript==
// @name         解除复制限制
// @description  解除网站的禁止复制功能,保留右键菜单
// @version      1.0
// @author       WJ
// @match        *://*/*
// @license      MIT
// @grant        none
// @run-at       document-start
// @namespace http://greasyfork.icu/users/914996
// ==/UserScript==

(function() {
    // CSS注入
    const style = document.createElement('style');
    style.textContent = `* { user-select: auto !important; }`;
    document.head.appendChild(style);
    
    // 仅阻止选择限制事件
    document.addEventListener('selectstart', e => {
        e.stopImmediatePropagation();
    }, true);
})();