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
(+importScript('User:Lethosor/spamblock.js'))
(remove some mostly outdated/broken tools)
 
Line 1: Line 1:
 
/* Any JavaScript here will be loaded for sysops only */
 
/* Any JavaScript here will be loaded for sysops only */
// Ajax patrolling!
 
importScript('User:Lethosor/ajaxpatrol.js');
 
  
//Spambot blocking tools (on Special:Block)
+
// add spam block link to Special:Log/newusers
if((wgPageName+'/').indexOf('Special:Block/')==0){
 
    var p=$('<p>').text('Spambot tools:').css({color:'red'}).prependTo('#mw-content-text fieldset');
 
    $('<button type="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!)');
 
}
 
// Improved:
 
 
importScript('User:Lethosor/spamblock.js');
 
importScript('User:Lethosor/spamblock.js');

Latest revision as of 01:04, 28 June 2019

/* Any JavaScript here will be loaded for sysops only */

// add spam block link to Special:Log/newusers
importScript('User:Lethosor/spamblock.js');