VideoPlayerMagic-Styles

CSS Styles for VideoPlayerMagic

Από την 15/02/2024. Δείτε την τελευταία έκδοση.

Αυτός ο κώδικας δεν πρέπει να εγκατασταθεί άμεσα. Είναι μια βιβλιοθήκη για άλλους κώδικες που περιλαμβάνεται μέσω της οδηγίας meta // @require https://update.sleazyfork.org/scripts/487369/1327775/VideoPlayerMagic-Styles.js

  1. // ==UserScript==
  2. // @name VideoPlayerMagic-Styles
  3. // @namespace vpm-s
  4. // @version 2024-02-15_4
  5. // @description CSS Styles for VideoPlayerMagic
  6. // @author SimplyMe
  7. // @license MIT
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. let vpmStyles = {
  12. 'pornhub': `div#player.maximized {position: fixed !important; top: 0; left: 0; height: 100vh !important; width: 100vw !important; z-index: 5000;}
  13. div#player.maximized video-element {height: inherit; width: inherit;}`,
  14. 'xhamster': `div#player-container.maximized {position: fixed; top: 0; left: 0; height: 100vh; width: 100vw; z-index: 5000;}`
  15. };
  16.  
  17. function injectStyles() {
  18. let styleTag = document.createElement('style');
  19. if (document.location.host.includes('pornhub'))
  20. styleTag.innerHTML = vpmStyles.pornhub;
  21. else if (document.location.host.includes('xhamster'))
  22. styleTag.innerHTML = vpmStyles.xhamster;
  23. document.head.appendChild(styleTag);
  24. }