VideoPlayerMagic-Styles

CSS Styles for VideoPlayerMagic

Від 15.02.2024. Дивіться остання версія.

Цей скрипт не слід встановлювати безпосередньо. Це - бібліотека для інших скриптів для включення в мета директиву // @require https://update.sleazyfork.org/scripts/487369/1327775/VideoPlayerMagic-Styles.js

// ==UserScript==
// @name         VideoPlayerMagic-Styles
// @namespace    vpm-s
// @version      2024-02-15_4
// @description  CSS Styles for VideoPlayerMagic
// @author       SimplyMe
// @license      MIT
// @grant        none
// ==/UserScript==

let vpmStyles = {
    'pornhub':  `div#player.maximized {position: fixed !important; top: 0; left: 0; height: 100vh !important; width: 100vw !important; z-index: 5000;}
                 div#player.maximized video-element {height: inherit; width: inherit;}`,
    'xhamster': `div#player-container.maximized {position: fixed; top: 0; left: 0; height: 100vh; width: 100vw; z-index: 5000;}`
};

function injectStyles() {
    let styleTag = document.createElement('style');
    if (document.location.host.includes('pornhub'))
        styleTag.innerHTML = vpmStyles.pornhub;
    else if (document.location.host.includes('xhamster'))
        styleTag.innerHTML = vpmStyles.xhamster;
    document.head.appendChild(styleTag);
}