MediaWiki:Gadget-PatrolTab.js: Difference between revisions
Jump to navigation
Jump to search
Want an adless experience? Log in or Create an account.
mNo edit summary |
mNo edit summary |
||
Line 5: | Line 5: | ||
if ( $patrollinks.length > 0 ) | if ( $patrollinks.length > 0 ) | ||
{ | { | ||
var | var patrolLink=addPortletLink ('p-cactions', ' ', 'Patrol', 'ca-patrol', 'Mark as patrolled', '1'); | ||
} | } | ||
$( | $(patrolLink).click( function( e ) { | ||
e.preventDefault(); | e.preventDefault(); | ||
jQuery(".patrollink a").click(); | jQuery(".patrollink a").click(); |
Revision as of 09:02, November 8, 2011
$( function() { 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', '1'); } $(patrolLink).click( function( e ) { e.preventDefault(); jQuery(".patrollink a").click(); }); } $(patroltab); } });