Anti-Malware Tool for Violent Monkey

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

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

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

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

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

你需要先安裝一款使用者腳本管理器擴展,比如 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
            }
        }
    }
})();