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.
mNo edit summary
mNo edit summary
Line 8: Line 8:
}
}
}
}
addOnloadHook(patroltab);
$(patroltab);
   }
   }
});
});

Revision as of 10:29, October 24, 2011

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