Jump to content

英文维基 | 中文维基 | 日文维基 | 草榴社区

Wikipedia:WikiProject User scripts/Scripts/Get user name

From Wikipedia, the free encyclopedia
/*<pre>*/
/*This script gets a username from the current page
Example: On [[User:Digitalme/getusername.js]], getUserName() would return Digitalme
*/

function getUserName(){
    return mw.config.get('wgRelevantUserName');
}
/*</pre>[[Category:Wikipedia scripts]]*/