v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "MediaWiki:Group-sysop.js"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
m (fix for Special:BlockList)
m (note)
Line 13: Line 13:
 
         form.submit();
 
         form.submit();
 
     });
 
     });
 +
    p.append('(No confirmation — use with caution!)');
 
}
 
}

Revision as of 22:34, 9 October 2013

/* Any JavaScript here will be loaded for sysops only */
// Ajax patrolling!
importScript('User:Lethosor/ajaxpatrol.js');

//Spambot blocking tools (on Special:Block)
if((wgPageName+'/').indexOf('Special:Block/')==0){
    var p=$('<p>').text('Spambot tools:').css({color:'red'}).prependTo('#mw-content-text fieldset');
    $('<button>').text('Suspected spambot').appendTo(p).click(function(e){
        e.preventDefault();
        var form=$(this).parents('form');
        form.find('[name=wpExpiry]').val('infinite');
        $('[name=wpReason]').val($('[name=wpReason]').find('option').filter(function(i,e){return $(e).text().toLowerCase().indexOf('suspected spam')>-1}).attr('value'));
        form.submit();
    });
    p.append('(No confirmation &mdash; use with caution!)');
}