XVideosDarkTheme

Dark theme auto

  1. // ==UserScript==
  2. // @author Lokryushed
  3. // @version 1.0
  4. // @name XVideosDarkTheme
  5. // @description Dark theme auto
  6. // @namespace XVideosDarkTheme
  7. // @date 2019-11-23
  8. // @include *xvideos.com*
  9. // @run-at document-start
  10. // @grant none
  11. // @license Public Domain
  12. // @icon https://www.xvideos.com/apple-touch-icon.png
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17. var staticDomain = 'https://static-ss.xvideos-cdn.com/';
  18. var pathStylesheet = 'v-3f9d60a79fc/v3/css/default/'
  19. var stylesheetFile = 'main-black.css'
  20. var styleSheetFileDarkTheme = staticDomain + pathStylesheet + stylesheetFile;
  21. var head = document.getElementsByTagName('head')[0];
  22. var link = document.createElement('link');
  23. link.rel = 'stylesheet';
  24. link.type = 'text/css';
  25. link.href = styleSheetFileDarkTheme;
  26. link.media = 'all';
  27. head.appendChild(link);
  28. })();