User:Equazcion/ReverseMarkedT.js
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:Equazcion/ReverseMarkedT. |
if (wgPageName == "Special:Watchlist") {
// The new watchlist feature adds a new HTML tag for unchecked links, and doesn't to anything to checked links.
// Therefore we can't reference only the checked links. Instead, we apply the fade to all items,
// then un-fade the items that have the new tag.
// Fade style for the entire checked line
$('table.mw-enhanced-rc').find('td:gt(0)').css('opacity', '0.8'); // Apply subtle fade to the second table cell of each line
// Includes everything except timestamp/nbsp's/bot/minor/etc
// Fade style for the checked main link only
$('table.mw-enhanced-rc').find('a:first').css('opacity', '0.75').css('font-style','italic').css('font-size','95%'); //
// Apply additional dramatic fade to the first <a> (link) in the table
// Style for unchecked
$('strong.mw-watched').parents('table').addClass('mw-watched'); // Apply new tag's class to the entire line (table element)
$('table.mw-watched').find('a:first').css('opacity', '1').css('font-style','normal').css('font-size','100%');
$('table.mw-watched').find('td:gt(0)').css('opacity', '1').css('font-style','normal').css('font-size','100%');
// Apply default style to second cell of tables now classed,
// and to the first <a> (link) of each
// "Mark all" button is pretty much useless in this setup
$('#mw-watchlist-resetbutton').remove();
}
if (wgAction == "history") {
// Green "updated since my last visit" notices are also not conducive to this setup,
// since we're now trying to "demote" checked changes rather than highlight unchecked ones.
$('.updatedmarker').remove();
}