User:Kanegasi/pendingdeletion.js

$.ajax({   type: "GET",    url: mw.util.wikiScript('api'),    data: {        format: 'json',        action: 'query',        list: 'categorymembers',        cmtitle: 'Category:Pending deletion'    },    dataType: 'json',    async: false,    success: function (catResponse) {        var taggedPages = 0;        for (var page in catResponse.query.categorymembers) {            taggedPages += 1;        }        if (taggedPages > 0) {            var $pendingDeletion = $('Delete pages (' + taggedPages + ')').attr({ id: 't-pendingdeletion', href: 'http://www.minecraftwiki.net/wiki/Category:Pending_deletion', style: 'font-weight:bold', title: 'Category:Pending deletion' });           $('#n-mainpage-description').before($('').html($pendingDeletion));        }    } });