This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var params = { | |
action: 'query', | |
list: 'users', | |
ususers: 'JJPMaster', | |
usprop: 'gender|editcount|groups', | |
format: 'json' | |
}, | |
api = new mw.Api(); | |
var users = data.query.users, | |
u; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"batchcomplete": "", | |
"query": { | |
"users": [ | |
{ | |
"userid": 31726653, | |
"name": "JJPMaster", | |
"editcount": 3975, | |
"groups": [ | |
"abusefilter-helper", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var params = { | |
action: 'edit', | |
title: 'User:JJPMaster/sandbox', | |
text: 'This edit is being automatically made as part of my new blog post.', | |
minor: true | |
}, | |
api = new mw.Api(); | |
api.postWithToken( 'csrf', params ).done( function ( data ) { | |
console.log( data ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ICU = mw.util.addPortletLink("p-cactions", "#", "ICU", "medium-blog-post", "Add an ICU tag to this article", null, "#ca-move"); | |
$(ICU).click(Tag); | |
function Tag() | |
{ | |
var params = { | |
action: 'edit', | |
title: mw.config.get('wgPageName'), | |
prependtext: '{{ICU|~~' + '~~' + '~}}', | |
summary: 'Adding ICU tag to article', |