Advertisement
ShaggyZE1

MAL Dark Mode #2

Aug 14th, 2022
765
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        MyAnimeList Dark Mode
  3. // @description MyAnimeList Dark Mode
  4. // @match       *://myanimelist.net/*
  5. // @exclude     *://myanimelist.net/(animelist|mangalist)/*
  6. // @exclude     *://myanimelist.net/ownlist/*
  7. // @grant       none
  8. // @namespace  
  9. // @copyright   2022, ShaggyZE (https://openuserjs.org/users/shaggyze)
  10. // @version     0.2
  11. // @author      ShaggyZE
  12. // @license     MIT; https://opensource.org/licenses/MIT
  13. // @updateURL  
  14. // @downloadURL
  15. // ==/UserScript==
  16.  
  17. const confBackg=()=>{
  18.     document.head.insertAdjacentHTML('beforeend', '<style>body:not(.ownlist) {background-image: none !important;}</style>'); //Remove the default background
  19.  
  20.     // Added #BA0E0A to #2a2a2a for background
  21.     const doc0=document,gtb0=(ds)=> getComputedStyle(ds).backgroundColor.includes('186, 14, 10') && ds.style || [],stl0=(s)=>(s.backgroundColor='#2a2a2a');
  22.     [doc0.body,doc0.documentElement].map(ds=> getComputedStyle(ds).backgroundColor.includes('186, 14, 10') && (ds.style.backgroundColor='#2a2a2a'));
  23.     const bdt0=['a','textarea','table','td','td1','div','dl','ul','pre','li','input','select'].map(s=>doc0.getElementsByTagName(s)).flatMap(ta=> Array.from(ta).flatMap(gtb0));
  24.     bdt0.map(stl0);
  25.  
  26.     // Added #FFFFFF to #2a2a2a for background
  27.     const doc=document,gtb=(ds)=> getComputedStyle(ds).backgroundColor.includes('255, 255, 255') && ds.style || [],stl=(s)=>(s.backgroundColor='#2a2a2a');
  28.     [doc.body,doc.documentElement].map(ds=> getComputedStyle(ds).backgroundColor.includes('255, 255, 255') && (ds.style.backgroundColor='#2a2a2a'));
  29.     const bdt=['a','textarea','table','td','td1','div','dl','ul','pre','li','input','select'].map(s=>doc.getElementsByTagName(s)).flatMap(ta=> Array.from(ta).flatMap(gtb));
  30.     bdt.map(stl);
  31.  
  32.     // Added #F6F6F6 to #2a2a2a for background
  33.     const doc1=document,gtb1=(ds)=> getComputedStyle(ds).backgroundColor.includes('246, 246, 246') && ds.style || [],stl1=(s)=>(s.backgroundColor='#2a2a2a');
  34.     [doc1.body,doc1.documentElement].map(ds=> getComputedStyle(ds).backgroundColor.includes('246, 246, 246') && (ds.style.backgroundColor='#2a2a2a'));
  35.     const bdt1=['a','div','td','td1','li'].map(s=>doc1.getElementsByTagName(s)).flatMap(ta=> Array.from(ta).flatMap(gtb1));
  36.     bdt1.map(stl1);
  37.  
  38.     // Added #000000 to #FFFFFF for text
  39.     const doc2=document,gtb2=(ds)=> getComputedStyle(ds).color.includes('0, 0, 0') && ds.style || [],stl2=(s)=>(s.color='#ffffff');
  40.     [doc2.body,doc2.documentElement].map(ds=> getComputedStyle(ds).color.includes('0, 0, 0') && (ds.style.color='#ffffff'));
  41.     const bdt2=['a','textarea','table','td','div','h1','h2',,'dl','ul','li','select'].map(s=>doc2.getElementsByTagName(s)).flatMap(ta=> Array.from(ta).flatMap(gtb2));
  42.     bdt2.map(stl2);
  43.  
  44.     // Added #1d439b to #99b0d3 for links
  45.     const doc3=document,gtb3=(ds)=> getComputedStyle(ds).color.includes('29, 67, 155') && ds.style || [],stl3=(s)=>(s.color='#99b0d3');
  46.     [doc3.body,doc3.documentElement].map(ds=> getComputedStyle(ds).color.includes('29, 67, 155') && (ds.style.color='#99b0d3'));
  47.     const bdt3=['a'].map(s=>doc3.getElementsByTagName(s)).flatMap(ta=> Array.from(ta).flatMap(gtb3));
  48.     bdt3.map(stl3);
  49.  
  50.     // Added #2e51a2 to #333333 for footer
  51.     const doc4=document,gtb4=(ds)=> getComputedStyle(ds).backgroundColor.includes('46, 81, 162') && ds.style || [],stl4=(s)=>(s.backgroundColor='#333333');
  52.     [doc4.body,doc4.documentElement].map(ds=> getComputedStyle(ds).backgroundColor.includes('46, 81, 162') && (ds.style.backgroundColor='#333333'));
  53.     const bdt4=['div'].map(s=>doc4.getElementsByTagName(s)).flatMap(ta=> Array.from(ta).flatMap(gtb4));
  54.     bdt4.map(stl4);
  55.  
  56.     // Added #323232 to #FFFFFF for select
  57.     const doc5=document,gtb5=(ds)=> getComputedStyle(ds).color.includes('50, 50, 50') && ds.style || [],stl5=(s)=>(s.color='#ffffff');
  58.     [doc5.body,doc5.documentElement].map(ds=> getComputedStyle(ds).color.includes('50, 50, 50') && (ds.style.color='#ffffff'));
  59.     const bdt5=['a','select'].map(s=>doc5.getElementsByTagName(s)).flatMap(ta=> Array.from(ta).flatMap(gtb5));
  60.     bdt5.map(stl5);
  61.  
  62.     //Added #4f74c8 to #222222 for headers
  63.     const doc6=document,gtb6=(ds)=> getComputedStyle(ds).backgroundColor.includes('79, 116, 200') && ds.style || [],stl6=(s)=>(s.backgroundColor='#222222');
  64.     [doc6.body,doc6.documentElement].map(ds=> getComputedStyle(ds).backgroundColor.includes('79, 116, 200') && (ds.style.backgroundColor='#222222'));
  65.     const bdt6=['div'].map(s=>doc6.getElementsByTagName(s)).flatMap(ta=> Array.from(ta).flatMap(gtb6));
  66.     bdt6.map(stl6);
  67.  
  68.     //Added #e1e7f5 to #222222 for headers and buttons
  69.     const doc7=document,gtb7=(ds)=> getComputedStyle(ds).backgroundColor.includes('225, 231, 245') && ds.style || [],stl7=(s)=>(s.backgroundColor='#222222');
  70.     [doc7.body,doc7.documentElement].map(ds=> getComputedStyle(ds).backgroundColor.includes('225, 231, 245') && (ds.style.backgroundColor='#222222'));
  71.     const bdt7=['a','button','table','div','h1'].map(s=>doc7.getElementsByTagName(s)).flatMap(ta=> Array.from(ta).flatMap(gtb7));
  72.     bdt7.map(stl7);
  73.  
  74.     // Added #77777 to #FFFFFF for input
  75.     const doc8=document,gtb8=(ds)=> getComputedStyle(ds).color.includes('119, 119, 119') && ds.style || [],stl8=(s)=>(s.color='#ffffff');
  76.     [doc8.body,doc8.documentElement].map(ds=> getComputedStyle(ds).color.includes('119, 119, 119') && (ds.style.color='#ffffff'));
  77.     const bdt8=['input'].map(s=>doc8.getElementsByTagName(s)).flatMap(ta=> Array.from(ta).flatMap(gtb8));
  78.     bdt8.map(stl8);
  79.  
  80.     // Added #00050c to #FFFFFF for text
  81.     const doc9=document,gtb9=(ds)=> getComputedStyle(ds).color.includes('0, 5, 12') && ds.style || [],stl9=(s)=>(s.color='#ffffff');
  82.     [doc9.body,doc9.documentElement].map(ds=> getComputedStyle(ds).color.includes('0, 5, 12') && (ds.style.color='#ffffff'));
  83.     const bdt9=['p','label'].map(s=>doc9.getElementsByTagName(s)).flatMap(ta=> Array.from(ta).flatMap(gtb9));
  84.     bdt9.map(stl9);
  85.  
  86.     // Added #2e51a2 to #FFFFFF for buttons
  87.     const doc10=document,gtb10=(ds)=> getComputedStyle(ds).color.includes('46, 81, 162') && ds.style || [],stl10=(s)=>(s.color='#ffffff');
  88.     [doc10.body,doc10.documentElement].map(ds=> getComputedStyle(ds).color.includes('46, 81, 162') && (ds.style.color='#ffffff'));
  89.     const bdt10=['button'].map(s=>doc10.getElementsByTagName(s)).flatMap(ta=> Array.from(ta).flatMap(gtb10));
  90.     bdt10.map(stl10);
  91.  
  92.     //Added #e1e7f5 to #222222 for borders
  93.     const doc11=document,gtb11=(ds)=> getComputedStyle(ds).border.includes('225, 231, 245') && ds.style || [],stl11=(s)=>(s.border='#222222');
  94.     [doc11.body,doc11.documentElement].map(ds=> getComputedStyle(ds).border.includes('225, 231, 245') && (ds.style.border='#222222'));
  95.     const bdt11=['a','button','table','div','h1'].map(s=>doc7.getElementsByTagName(s)).flatMap(ta=> Array.from(ta).flatMap(gtb11));
  96.     bdt11.map(stl11);
  97.  
  98.     // Added #4165ba to #333333 for input
  99.     const doc12=document,gtb12=(ds)=> getComputedStyle(ds).backgroundColor.includes('65, 101, 186') && ds.style || [],stl12=(s)=>(s.backgroundColor='#333333');
  100.     [doc12.body,doc12.documentElement].map(ds=> getComputedStyle(ds).backgroundColor.includes('65, 101, 186') && (ds.style.backgroundColor='#333333'));
  101.     const bdt12=['input'].map(s=>doc12.getElementsByTagName(s)).flatMap(ta=> Array.from(ta).flatMap(gtb12));
  102.     bdt12.map(stl12);
  103. };
  104.    addEventListener('load',confBackg(),false);
  105.    var item = document.getElementById("header-notification-item-list");
  106.    item.addEventListener("mouseover", confBackg(), false);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement