Drupal Copy Prevention Bypasser

Bypass Drupal Copy Prevention on sites that use it.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name     	Drupal Copy Prevention Bypasser
// @namespace   https://github.com/Enchoseon/enchos-assorted-userscripts/raw/main/drupal-copy-prevention-bypasser.user.js
// @version  	1.0.1
// @description Bypass Drupal Copy Prevention on sites that use it.
// @author   	Enchoseon
// @include  	*
// @grant    	none
// ==/UserScript==

(function() {
    "use strict";
    if (typeof Drupal !== "undefined" && typeof Drupal.behaviors.copyprevention !== "undefined") {
        console.log("Drupal site using copyprevention detected");
        Object.values(document.getElementsByClassName("copyprevention-processed")).forEach((elem) => {
            elem.style.zIndex = "69420";
            elem.replaceWith(elem.cloneNode(true)); // Extremely unclean removal of event listeners
        });
    }
})();