Page Flip

Flip the entire page 90 degrees clockwise every time a key is pressed

// ==UserScript==
// @name         Page Flip
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Flip the entire page 90 degrees clockwise every time a key is pressed
// @match        *://*/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    let degree = 0;
    document.body.addEventListener('keydown', function(event) {
        if (!['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(event.key)) {
            degree = (degree + 90) % 360;
            document.body.style.transform = `rotate(${degree}deg)`;
        }
    });
})();