VideoPlayerMagic-Styles

CSS Styles for VideoPlayerMagic

目前為 2024-02-15 提交的版本,檢視 最新版本

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.sleazyfork.org/scripts/487369/1327738/VideoPlayerMagic-Styles.js

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

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

function injectStyles() {
    let styleTag = document.createElement('style');
    styleTag.innterText = vpmStyles[document.location.host];
    document.head.appendChild(styleTag);
}