Bird PSA

Alerts if "bird" is found in the URL or page content.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Bird PSA
// @namespace    http://greasyfork.org/
// @version      1.0
// @license MIT
// @description  Alerts if "bird" is found in the URL or page content.
// @author       LiyahMackenzie
// @match        *://*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

//checking
function checkForBird() {
        let found = false;

//url checking
if (window.location.href.toLowerCase().includes("bird")) {
            found = true;
        }

        let bodyText = document.body.innerText.toLowerCase();
        if (bodyText.includes("bird")) {
            found = true;
        }

//alert
        if (found) {
            alert("Note: birds are not real. They are government drones that disguise themselves in cuteness.");
        }
    }

//run
window.addEventListener("load", checkForBird);
})();