17,230
edits
(rewrite using $.getJSON) |
m (update deprecated wg variables to mw.config) |
||
Line 1: | Line 1: | ||
// If on a user or user talk page, and not a subpage... | // If on a user or user talk page, and not a subpage... | ||
if ((wgNamespaceNumber == 2 || wgNamespaceNumber == 3) && | if ((mw.config.get('wgNamespaceNumber') == 2 || mw.config.get('wgNamespaceNumber') == 3) && | ||
!/\//.test(wgTitle)) { | !/\//.test(mw.config.get('wgTitle'))) { | ||
// add a hook to... | // add a hook to... | ||
$(function() { | $(function() { | ||
Line 11: | Line 11: | ||
action: 'query', | action: 'query', | ||
list: 'users', | list: 'users', | ||
ususers: escape(wgTitle.replace(/ /, "_")), | ususers: escape(mw.config.get('wgTitle').replace(/ /, "_")), | ||
usprop: 'gender' | usprop: 'gender' | ||
}, | }, |