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 (bugfix)
(+importScript('User:Lethosor/spamblock.js'))
Line 15: Line 15:
 
     p.append('(No confirmation — use with caution!)');
 
     p.append('(No confirmation — use with caution!)');
 
}
 
}
 +
// Improved:
 +
importScript('User:Lethosor/spamblock.js');

Revision as of 01:50, 14 December 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 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');