Wikipedia:WikiProject User scripts/Scripts/Get Page Name: Difference between revisions

Content deleted Content added
m Protected Wikipedia:WikiProject User scripts/Scripts/Get Page Name: protect against abuse - arbitrary code injection [edit=sysop:move=sysop] [cascading]
No edit summary
 
(One intermediate revision by one other user not shown)
Line 2:
/*Returns the name of the page. For example, if you were browsing the "[[foo]]" WP page, getPname() would return "foo".*/
function getPname() {
return mw.config.get('wgPageName').replace(/_/g, ' ');
}
/*</pre>[[Category:Wikipedia scripts]]*/