Description | Highlight administrators using a single CSS file, avoiding flashs of unstyled content Highlight Admins highlights administrators using a single CSS file. This avoids flashs of unstyled content as the CSS is loaded as a part of the initial page load rather than after. |
---|---|
Author(s) | User:BrandonXLF |
Status | Working |
First released | August 19, 2020 |
Source | HighlightAdmins.css |
Highlight Admins highlights administrators using a single CSS file. This avoids flashs of unstyled content as the CSS is loaded as a part of the initial page load rather than after.
You can install this script using JavaScript (JS) or Cascading Style Sheets (CSS). CSS will allow the script to run right at load whereas JS may have a delay before applying, this means the scripts style won't work instantly using JS but will using CSS.
importStylesheet('User:BrandonBot/HighlightAdmins.css'); // [[User:BrandonBot/HighlightAdmins.css]]
mw.loader.load('/w/index.php?title=User:BrandonBot/HighlightAdmins.css&action=raw&ctype=text/css', 'text/css'); // [[User:BrandonBot/HighlightAdmins.css]]
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:BrandonBot/HighlightAdmins.css&action=raw&ctype=text/css', 'text/css');
@import url(https://en.wikipedia.org/w/index.php?title=User:BrandonBot/HighlightAdmins.css&action=raw&ctype=text/css); /* [[User:BrandonBot/HighlightAdmins.css]] */
Comments are welcome on my talk page, be sure to indicate that you're talking about this script in the title. I would really like any suggestion to make the script run better.