User:NguoiDungKhongDinhDanh/Gadget-markadmins.js: Difference between revisions
From Test Wiki
Content deleted Content added
m - |
m Tweak |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
// For attribution: [[MediaWiki:Gadget-markadmins.js]] |
|||
// rewritten by [[m:User:Hoo man]]; 2012-08-26, adapted by [[User:Obersachse]], optimized by [[User:Jack who built the house]] |
|||
(function () { |
(function () { |
||
| Line 51: | Line 51: | ||
new mw.Api().get({ |
new mw.Api().get({ |
||
action: 'query', |
action: 'query', |
||
| ⚫ | |||
list: 'allusers', |
list: 'allusers', |
||
| ⚫ | |||
meta: '', |
|||
| ⚫ | |||
| ⚫ | |||
auprop: 'groups', |
auprop: 'groups', |
||
aulimit: |
aulimit: 500, |
||
| ⚫ | |||
auwitheditsonly: 1 |
|||
| ⚫ | |||
}).done(function(ans) { |
}).done(function(ans) { |
||
var list = ans.query.allusers, |
var list = ans.query.allusers, |
||
| Line 76: | Line 74: | ||
} |
} |
||
} |
} |
||
console.warn(userSet); |
|||
$links.each(function (i, link) { |
$links.each(function (i, link) { |
||
| Line 90: | Line 86: | ||
matches = /^User:(.+)|Talk:(.+)/.exec(link.title); |
matches = /^User:(.+)|Talk:(.+)/.exec(link.title); |
||
if (!matches) return; |
if (!matches) return; |
||
if |
if (matches[2]) { |
||
if ($(link).parent().hasClass('mw-usertoollinks') || link.textContent.match(/обс/i)) return; |
if ($(link).parent().hasClass('mw-usertoollinks') || link.textContent.match(/обс/i)) return; |
||
matches[1] = matches[2]; |
matches[1] = matches[2]; |
||