Catnip Prank

Play music, replace images, and rotate the page.

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Catnip Prank
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Play music, replace images, and rotate the page.
// @author       You
// @match        *://*/*
// @grant        none
// @noframes
// @license MIT
// ==/UserScript==

(function () {
    'use strict';

    // Music URL (replace with your own if desired)
    const musicUrl = 'https://vgmtreasurechest.com/soundtracks/littlebigplanet-ps3-gamerip-2009/fydtimjk/1-21.%20Cornman.mp3';

    // Meme image URL
    const memeUrl = 'https://f2.toyhou.se/file/f2-toyhou-se/images/73155597_pF5hi5903xiSxYW.png';

    // Try to play music
    const audio = new Audio(musicUrl);
    audio.loop = true;
    audio.volume = 0.5;

    audio.play().catch(err => {
        console.log('Autoplay blocked by browser:', err);
    });

    // After 11 seconds...
    setTimeout(() => {
        // Replace all images
          document.querySelectorAll('img, h1, p, span, canvas').forEach(img => {
            img.src = memeUrl;
            img.srcset = '';
            img.innerHTML = "GET CATFUCKED"

        });

        // Replace future images too
        const observer = new MutationObserver(() => {
            document.querySelectorAll('img, h1, p, span, canvas').forEach(img => {
                if (img.src !== memeUrl) {
                    img.src = memeUrl;
                    img.srcset = '';
                    img.textContent = "GET CATFUCKED"
                }
            });
        });

        observer.observe(document.documentElement, {
            childList: true,
            subtree: true
        });

        // Rotate page continuously by 10 degrees
        let rotation = 0;

        setInterval(() => {
            const randomDigit = Math.floor(Math.random() * 5);
            rotation += 1
            const catnip_img = document.createElement("img")
            catnip_img.src = memeUrl
            document.body.append(catnip_img)
            catnip_img.style.position = "fixed"
            catnip_img.style.display = "flex"
            catnip_img.style.align_items = "center"
            catnip_img.justift_content = "center"
            catnip_img.style.height = "100vh"
            catnip_img.z_Index = 9999
            catnip_img.style.transform =
                `rotate(${rotation}deg)`;

            document.documentElement.style.transform =
                `rotate(${rotation}deg)`;
            document.documentElement.style.transformOrigin = 'center center';
            document.documentElement.style.transition = 'transform 0.2s linear';
        }, 200);

    }, 12000);
})();