MediaWiki:Gadget-PatrolTab.js: Difference between revisions

From Zelda Dungeon Wiki
Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
m (Much more convient access key.)
mNo edit summary
Line 1: Line 1:
$( function() {
 
   if ( wgUserGroups.toString().indexOf('sysop') == -1 || wgUserGroups.toString().indexOf('patroller') == -1) {
   if ( wgUserGroups.toString().indexOf('sysop') == -1 || wgUserGroups.toString().indexOf('patroller') == -1) {
function patroltab() {
function patroltab() {
Line 13: Line 13:
}
}
$(patroltab);
$(patroltab);
  }
});

Revision as of 08:33, January 5, 2012


  if ( wgUserGroups.toString().indexOf('sysop') == -1 || wgUserGroups.toString().indexOf('patroller') == -1) {
function patroltab() {
        var $patrollinks = $('.patrollink a');
	if ( $patrollinks.length > 0 )
{
var patrolLink=addPortletLink ('p-cactions', ' ', 'Patrol', 'ca-patrol', 'Mark as patrolled', 'x');
}
$(patrolLink).click( function( e ) {
        e.preventDefault();
        jQuery(".patrollink a").click();
});
}
$(patroltab);