User:Void/common.js: Difference between revisions
Content deleted Content added
add testing script for later |
global |
||
(27 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
mw.loader.load('//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Writ_Keeper/Scripts/massRevdel.js'); |
|||
mw.loader.load('//en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=User:Writ_Keeper/Scripts/massRollback.js'); |
|||
mw.loader.load('//www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-DotsSyntaxHighlighter.js&action=raw&ctype=text/javascript'); |
mw.loader.load('//www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-DotsSyntaxHighlighter.js&action=raw&ctype=text/javascript'); |
||
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js'); |
|||
//mw.loader.load('//publictestwiki.com/w/index.php?title=User:Void/testing.js&action=raw&ctype=text/javascript'); |
//mw.loader.load('//publictestwiki.com/w/index.php?title=User:Void/testing.js&action=raw&ctype=text/javascript'); |
||
mw.loader.load('//publictestwiki.com/w/index.php?title=User:Void/findInactiveSysops.js&action=raw&ctype=text/javascript'); |
|||
//Testing js to automate finding inactive sysops |
|||
/* var testlink = mw.util.addPortletLink( |
|||
'p-personal', |
|||
'#', |
|||
'Test Script', |
|||
'pt-testscript', |
|||
'Test this piece of JS', |
|||
null, |
|||
'#pt-adminlinks' |
|||
); |
|||
$( testlink ).click( function () { |
|||
var doThis = confirm('Do you want to run the script?'); |
|||
if( doThis ){ |
|||
$.getJSON( |
|||
//Get userlist |
|||
mw.util.wikiScript('api'), |
|||
{ |
|||
format: 'json', |
|||
action: 'query', |
|||
list: 'allusers', |
|||
augroup: 'sysop', |
|||
aulimit: 50, //Set limit to 50 as there are no more than 50 sysops |
|||
titles: "Wikipedia:Edit filter/False positives/Reports" |
|||
} |
|||
).done( function ( data ) { |
|||
try { |
|||
var users = data.query.allusers; |
|||
var userlist = []; |
|||
users.forEach(function(object){ |
|||
userlist.push(object.name); |
|||
}); |
|||
console.log(userlist); |
|||
} |
|||
catch ( e ) { |
|||
console.log( "Content request error: " + e.message ); |
|||
console.log( "Content request response: " + JSON.stringify( data ) ); |
|||
} |
|||
} ).fail( function () { |
|||
console.log( "While getting the wikitext, there was an AJAX error." ); |
|||
} ); |
|||
} |
|||
} ); |
|||
*/ |
Latest revision as of 02:36, 3 February 2018
mw.loader.load('//www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-DotsSyntaxHighlighter.js&action=raw&ctype=text/javascript');
//mw.loader.load('//publictestwiki.com/w/index.php?title=User:Void/testing.js&action=raw&ctype=text/javascript');
mw.loader.load('//publictestwiki.com/w/index.php?title=User:Void/findInactiveSysops.js&action=raw&ctype=text/javascript');