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 |
|||
Line 1: | Line 1: | ||
function patroltab() { | function patroltab() { | ||
var $patrollinks = $('.patrollink a'); | var $patrollinks = $('.patrollink a'); | ||
if ( $patrollinks.length > 0 ){ | if ( $patrollinks.length > 0 ) | ||
{ | |||
var patrolLink=mw.util.addPortletLink ('p-cactions', ' ', 'Patrol', 'ca-patrol', 'Mark as patrolled', 'x'); | var patrolLink=mw.util.addPortletLink ('p-cactions', ' ', 'Patrol', 'ca-patrol', 'Mark as patrolled', 'x'); | ||
} | |||
$(patrolLink).click( | $(patrolLink).click( | ||
jQuery(".patrollink a").click() | jQuery(".patrollink a").click() | ||
); | ); | ||
} | |||
$(patroltab); | $(patroltab); | ||
Revision as of 15:19, March 19, 2017
function patroltab() { var $patrollinks = $('.patrollink a'); if ( $patrollinks.length > 0 ) { var patrolLink=mw.util.addPortletLink ('p-cactions', ' ', 'Patrol', 'ca-patrol', 'Mark as patrolled', 'x'); } $(patrolLink).click( jQuery(".patrollink a").click() ); } $(patroltab);