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
(addPortletLink -> mw.util.addPortletLink)
Line 3: Line 3:
if ( $patrollinks.length > 0 )
if ( $patrollinks.length > 0 )
{
{
var patrolLink=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( function( e ) {
$(patrolLink).click( function( e ) {

Revision as of 03:17, January 26, 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( function( e ) {
        e.preventDefault();
        jQuery(".patrollink a").click();
});
}
$(patroltab);