User talk:Kalan/markblocked.js

From Wikipedia, the free encyclopedia

This script strikes blocked users from Wikipedia pages like in LiveJournal. It affects links to user and user talk pages (except subpages and section links) and contributions (may be useful for anons).

Contents

[edit] Description

User
Troll
Vandal
How it should look

When page loading is finished, the script searches for userpage links, grabs the information about their status from API and marks them: blocked users are marked with a strikeout and a lighter color; users that are blocked indefinitely get italic text and more lighter color in addition.

If the strikeout impedes you from reading link text, just hover your mouse above it, and it will descend a little.

By the way, the link tooltip now contains useful information: username of the admin who has performed the block, expiry time and the comment from the block log.

[edit] Configuration

To save the settings, you should list them in your js-file (commonly monobook.js).

Setting Explaination
mbTempStyle = '…css‑code…'
By setting this, you may completely change the style of links to temporary blocked users.
User
Troll
Vandal
mbTempStyle = 'border-bottom:1px solid #F4A430'
mbIndefStyle = 'border-bottom:1px solid #E41212'
Troll
mbTempStyle = ''

In case you don't like the effect on temporary blocked users

mbIndefStyle = '…css‑code…'
The same for indefinitely blocked users.
As an alternative, you may use CSS. Class names for the links are .user-blocked-temp and .user-blocked-indef.
mbTooltip = '— $2 until $1 with reason: $3'
Tooltip appendix, where $1 is for expiry time, $2 is for blocker, and $3 is replaced with the block comment.
mbLoadingOpacity = 0.25
By default, when the data loading is started, links become a little pale. You may change the transparency from 0 (invisible) to 1 (unchanged); default is 0.85. Doesn't work in IE.
mbNoAutoStart = true
If you don't need strikeouts on every page and bandwidth amount matters for you, turn it on. Henceforth the process will not run automatically and you will have to press the xx tab.
mbTipBox = true
If you use Lupin's popups or any other script that changes the behavior when moving a mouse above the link, you may find this option useful. Tooltip is carried out into a small orange box before the link. #User:Vandal
mbTipBoxStyle = '…css‑code…'
You may style the orange box above as you like. For CSS tricks, use .user-blocked-tipbox.

[edit] Technical details

  • The script has been tested in IE 6.0, IE 7.0, Firefox 2.0.0.14, Opera 9.27.
  • Due to Firefox 2 bugs, users of this browser may not see the full text of tooltips. One of the possible ways to fix that is Long Titles extension.
  • Links' semi-transparency is unavailable in Internet Explorer by default.

[edit] Known issues

  • Some pages (e.g., history of blocked user's talkpage) may look weird.