User:Dragoniez/Mark (B)Locked Global

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search
A sample image of how blocked users' links will look with the script installed

Mark (B)Locked Global (MBLG) is a script forked from en:MediaWiki:Gadget-markblocked.js. The original script marks up links related to locally blocked users and single IPs, but doesn't mark up for example those related to locally blocked IP ranges and globally locked users.

MBLG even marks up those links that the original script can't mark up. In detail, it marks up links related to:

  • Locally blocked users and single IPs (as the original script does)
  • Single IPs in locally blocked IP ranges
  • Locally blocked IP ranges
  • Globally locked users
  • Globally blocked single IPs and IP ranges

Moreover, MBLG is coded to work on any wiki without any configuration.

If you're interested, see also mw:User:Dragoniez/Gadget-MarkBLocked, an easy-to-install, local-wiki specialized version for use as a gadget. See the descriptions on the linked page for details.


Add the following to Special:MyPage/global.js (please include a backlink so I can see who's using the script). You can also add it to your common.js on your local wiki (although this doesn't quite bring you notable benefits). Don't forget to add the prefix "m:" in the backlink if you install the script outside meta. (source code)

// Mark (B)Locked Global [[User:Dragoniez/Mark BLocked Global.js]]
mw.loader.load('// BLocked Global.js&action=raw&ctype=text/javascript');

On installation, make sure that you disable any similar gadgets and scripts, or you'll be making unnecessary API requests in the background and page loading can be unnecessarily slow.


If your local wiki has a similar gadget installed and if you want to use that on that specific wiki but want to use MBLG on other projects, configure your installation so that this script won't be loaded on that particular wiki, in ways like the following:

if (mw.config.get('wgDBname') !== 'jawiki' ) {
    mw.loader.load('// BLocked Global.js&action=raw&ctype=text/javascript');
var exclude = ['jawiki', 'zhwiki'];
if ($.inArray(mw.config.get('wgDBname'), exclude) === -1) {
    mw.loader.load('// BLocked Global.js&action=raw&ctype=text/javascript');