Anti-Malware Tool for Violent Monkey

Block potentially malicious scripts or files from loading on webpages and display a watermark when malware is detected

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Anti-Malware Tool for Violent Monkey
// @version      1.1
// @description  Block potentially malicious scripts or files from loading on webpages and display a watermark when malware is detected
// @match        *://*/*
// @license      Copyright (C) TheBaker0
// @author       TheBaker
// @namespace https://greasyfork.org/users/1073712
// ==/UserScript==

(function() {
    'use strict';

    // Add any keywords or phrases associated with malware here
    var malwareKeywords = [
        "virus",
        "trojan",
        "malware",
        "spyware",
        "keylogger"
    ];

    // Create the watermark
    var watermark = document.createElement("div");
    watermark.style.position = "fixed";
    watermark.style.top = "0";
    watermark.style.left = "0";
    watermark.style.width = "100%";
    watermark.style.height = "100%";
    watermark.style.backgroundColor = "rgba(255, 0, 0, 0.5)";
    watermark.style.zIndex = "9999";
    watermark.style.display = "none";
    watermark.innerText = "MALWARE DETECTED! I saved your computer, you owe me a sub'script'ion!";

    // Add the watermark to the page
    document.body.appendChild(watermark);

    var links = document.getElementsByTagName("link");
    for (var i = 0; i < links.length; i++) {
        var href = links[i].href;
        for (var j = 0; j < malwareKeywords.length; j++) {
            if (href.indexOf(malwareKeywords[j]) >= 0) {
                links[i].parentNode.removeChild(links[i]);
                watermark.style.display = "block"; // Show the watermark
            }
        }
    }

    var scripts = document.getElementsByTagName("script");
    for (var i = 0; i < scripts.length; i++) {
        var src = scripts[i].src;
        for (var j = 0; j < malwareKeywords.length; j++) {
            if (src.indexOf(malwareKeywords[j]) >= 0) {
                scripts[i].parentNode.removeChild(scripts[i]);
                watermark.style.display = "block"; // Show the watermark
            }
        }
    }
})();