Remove Copy-Paste and Anti-Screen-Capture Restriction

Remove copy-paste and anti-screen-capture restrictions on websites

目前為 2024-03-19 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Remove Copy-Paste and Anti-Screen-Capture Restriction
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Remove copy-paste and anti-screen-capture restrictions on websites
// @author       YOU
// @match        *://*/*
// @grant        none
// @license      MIT
// ==/UserScript==

document.addEventListener('copy', function(e) {
    e.stopPropagation();
}, true);

document.addEventListener('cut', function(e) {
    e.stopPropagation();
}, true);

document.addEventListener('paste', function(e) {
    e.stopPropagation();
}, true);

// Prevent visibility change detection
Object.defineProperty(document, 'hidden', { value: false, writable: false });
Object.defineProperty(document, 'visibilityState', { value: 'visible', writable: false });

// Prevent blur detection
window.addEventListener('blur', function() {
    window.focus();
});