ARTLUNG LAB Share

Created October 2025

Upside Down Web Page Bookmarklet

Created for 2025's Weird Web October , use this bookmarklet to make whatever weird or wonderful page you happen to be on turn upside down.

Code Wise, there are at least two ways to make a web page be upside-down. There's scale: -1; and also rotate: 90deg;. Alternately one could write transform: rotate(90deg) or transform: scale(-1). The successful transform requires transform-origin have its default value of center center, which can also be written as 50% 50%.

To use, drag the link below to your bookmarks bar. Click to toggle on and off.

Upside-down

Source Code

(function () {
    // only add a unique classname to the body if it's not there, remove if it is
    if (document.body.classList.contains('upside-down')) {
        document.body.classList.remove('upside-down');
        window.scrollTo(0, 0);
        return;
    } else {
        document.body.classList.add('upside-down');
        window.scrollTo(0, 0);
    }

    // if we already injected the style, certainly don't do that again
    if (document.getElementById('upside-down-style')) {
        return;
    }

    // calculate the height of all content
    const body = document.body;
    const html = document.documentElement;
    const heightOfAllContent = Math.max(
        body.scrollHeight, body.offsetHeight,
        html.clientHeight, html.scrollHeight, html.offsetHeight
    );


    // if you key in + make it faster, - make it slower
    const style = document.createElement('style');
    // add an id so we know if we already added it
    style.id = 'upside-down-style';
    style.textContent = `html:has(body.upside-down) {
  background: repeating-conic-gradient(#ccc3 0 25%, #0000 0 50%) 50% 0 / 10vw 10vh;
}
html body.upside-down {
  transform-origin: 50% 50%;
  scale: -1;
  min-height: ${heightOfAllContent}px;
}
`;
    document.head.appendChild(style);
})();

Go make a web page.