Eink-UpDown (modified)

based on the script by ZZYSonny, move the clock box to the middle of left most.

// ==UserScript==
// @name         Eink-UpDown (modified)
// @namespace    https://greasyfork.org/users/169007
// @version      1.2.4
// @description  based on the script by ZZYSonny, move the clock box to the middle of left most.
// @author       ZZYSonny
// @match        *://*/*
// @grant        none
// @run-at       document-body
// @license      MIT
// ==/UserScript==
(function () {
    'use strict';
    const body = document.body;
    const positionCSS = "top:50%;left:0;transform: translateY(-50%)";
    const sizeCSS = "width:15vmin;height:30vmin";
    const scrollRatio = 0.9;

    const Container = document.createElement("div");
    Container.style.cssText = `
        ${sizeCSS};
        ${positionCSS};
        position:fixed;
        display:flex;
        flex-direction:column;
        border-style:dashed;
        z-index:2147483647;
        border-width:2px;
    `;

    const UpButton = document.createElement("div");
    UpButton.style.cssText = "flex:1";
    UpButton.addEventListener('click', () => { window.scrollBy(0, -scrollRatio * window.innerHeight) });

    const DownButton = document.createElement("div");
    DownButton.style.cssText = "flex:1;border-top-style:dashed;border-width:2px;";
    DownButton.addEventListener('click', () => { window.scrollBy(0, scrollRatio * window.innerHeight) });

    Container.appendChild(UpButton);
    Container.appendChild(DownButton);
    body.appendChild(Container);
})();