User:Tamzin/main-page-redirect-checker.css
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
Documentation for this user script can be added at User:Tamzin/main-page-redirect-checker. |
/* Notes: 1. This does not work on Firefox unless you change your settings, nor
on Samsung Internet. See <https://developer.mozilla.org/en-US/docs/Web/CSS/:has#browser_compatibility>.
2. If copy-pasting to modify, ignore "Expected RPAREN" syntax errors. */
/* Turns the welcome banner on the Main Page pink if there's a redirect anywhere on the page */
.page-Main_Page:has(.mw-redirect) #mp-welcome {
background: pink;
}
/* Turns a Main Page section's borders pink if there's a redirect anywhere in the section */
.page-Main_Page .mp-box:has(.mw-redirect) {
border: 3px pink solid !important;
}
/* Makes Main Page redirects super-noticeable.*/
.page-Main_Page span:has(.mw-redirect),
.page-Main_Page p:has(.mw-redirect),
.page-Main_Page li:has(.mw-redirect) {
background:purple;
color:white;
}
.page-Main_Page .mw-redirect {
color: yellow !important;
font-weight: bold;
font-size: 150%;
}