Prev Next Page on Screen

Clone and keep it fixed on the screen

当前为 2025-03-10 提交的版本,查看 最新版本

// ==UserScript==
// @name         Prev Next Page on Screen
// @namespace    Violentmonkey Scripts
// @version      1.0
// @description  Clone and keep it fixed on the screen
// @author       king1x32
// @match        https://voz.vn/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    function cloneAndFixDiv() {
        const originalDiv = document.querySelector('.block-outer-main');
        if (originalDiv) {
            const clonedDiv = originalDiv.cloneNode(true);
            Object.assign(clonedDiv.style, {
                position: 'fixed',
                bottom: '9px',
                left: '50%',
                transform: 'translateX(-50%)',
                width: 'auto',
                zIndex: '9999',
                backgroundColor: 'transparent'
            });
            document.body.appendChild(clonedDiv);
        }
    }
    window.addEventListener('load', cloneAndFixDiv);
})();