SHARE
TWEET

V3r USA theme

Burkino Jun 2nd, 2020 (edited) 1,073 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name           V3rmillion USA
  3. // @author         Burkino
  4. // @namespace      https://v3rmillion.net/
  5. // @version        0.3
  6. // @description    USA! USA! USA!
  7. // @run-at         document-idle
  8. // @include        *://*.v3rmillion.net/*
  9. // @include        *://v3rmillion.net/*
  10. // @grant          GM_addStyle
  11. // ==/UserScript==
  12.  
  13. (function() {
  14.     function getImagesByAlt(alt) {
  15.         var allImages = document.getElementsByTagName("img");
  16.         var images = [];
  17.         for (var i = 0, len = allImages.length; i < len; ++i) {
  18.             if (allImages[i].alt == alt) {
  19.                 images.push(allImages[i]);
  20.             }
  21.         }
  22.         return images;
  23.     }
  24.     try {
  25.         for (var Pride of getImagesByAlt("Pride Charity Award")) {
  26.             Pride.setAttribute("src", "https://v3rmillion.net/favicon_USA.ico") // replaces pride awards with American pride
  27.             Pride.setAttribute("height", "24") // scales awards to the proper size
  28.             Pride.setAttribute("width", "24")
  29.         }
  30.     }
  31.     catch (e){
  32.         console.log("no pride award")
  33.     }
  34.  
  35.     GM_addStyle(`
  36.        :root {
  37.          --pride-banner:
  38.          linear-gradient(45deg, #B22234 0%, #FFFFFF 50%, #3C3B6E 100%);
  39.  
  40.          --pride-banner-rgba:
  41.          repeating-linear-gradient(to right, rgba(178, 34, 52, 1), rgba(255, 255, 255, 1), rgba(60, 59, 110, 1));
  42.        }
  43.        .thead {
  44.           text-shadow:
  45.              -1px -1px 0 #1a1a1a,
  46.               0   -1px 0 #1a1a1a,
  47.               1px -1px 0 #1a1a1a,
  48.               1px  0   0 #1a1a1a,
  49.               1px  1px 0 #1a1a1a,
  50.               0    1px 0 #1a1a1a,
  51.              -1px  1px 0 #1a1a1a,
  52.              -1px  0   0 #1a1a1a;
  53.            };
  54.     `)
  55.     /*
  56.     --pride-banner is the outlines
  57.     --pride-banner-rgba is the inner gradient only seen on theme 2
  58.     .thead is the text inside the rgba gradients
  59.     */
  60.  
  61.     var link = document.querySelector("link[rel*='icon']") || document.createElement('link');
  62.     link.type = 'image/x-icon';
  63.     link.rel = 'shortcut icon';
  64.     link.href = 'https://v3rmillion.net/favicon_USA.ico';
  65.     document.getElementsByTagName('head')[0].appendChild(link); // sets favicon to usa icon
  66.  
  67.     try {
  68.         document.getElementById("logo").querySelector("a").querySelector("img").setAttribute("src", "https://i.imgur.com/mfMOwpe.gif") //Logo at top
  69.     } catch (e){
  70.         console.log("couldnt find logo, internal error page?")
  71.     }
  72.  
  73.     try {
  74.         document.getElementById("container").quertSelector("img").setAttribute("src", "https://i.imgur.com/mfMOwpe.gif") //Logo on error page
  75.     } catch(e) {
  76.         console.log("couldnt find logo, not error page?")
  77.     }
  78. })();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top