TILT -45° Prank

Funny prank to slowly tilt websites -45° to mess with people

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name           TILT -45° Prank
// @name:fr        INCLINAISON -45° Farce
// @namespace      VElMVCAtNDXCsCBQcmFuaw
// @version        1.1
// @description    Funny prank to slowly tilt websites -45° to mess with people
// @description:fr Blague drôle pour incliner les sites Web de -45°
// @author         smed79
// @license        GPLv3
// @icon           https://i25.servimg.com/u/f25/11/94/21/24/tilt4510.png
// @match          *://*/*
// @run-at         document-start
// @grant          none
// ==/UserScript==

(function() {
    'use strict';

    // The CSS: Adds a smooth 3-second animation so the user watches the page fall over
    const css = `
        html {
            transform: rotate(-45deg) !important;
            transform-origin: center center !important;
            transition: transform 3s ease-in-out !important;
        }
    `;

    // Create the style element
    const style = document.createElement('style');
    style.textContent = css;

    // Safely inject it as early as possible
    const injectStyle = () => {
        if (document.head) {
            document.head.appendChild(style);
        } else if (document.documentElement) {
            document.documentElement.appendChild(style);
        } else {
            const observer = new MutationObserver((mutations, obs) => {
                if (document.head || document.documentElement) {
                    (document.head || document.documentElement).appendChild(style);
                    obs.disconnect();
                }
            });
            observer.observe(document, { childList: true, subtree: true });
        }
    };

    injectStyle();
})();