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

Content deleted Content added
Lupin (talk | contribs)
this script is now obselete; one-line version for transitional purposes
No edit summary
 
(5 intermediate revisions by 5 users not shown)
Line 1:
/*<pre>*/
/*Returns the name of the page. For example, if you were browsing the "[[foo]]" WP page, getPname() would return "foo".*/
 
// <pre><nowiki>
function getPname() {
return mw.config.get('wgPageName').replace(/_/g, ' ');
return wgTitle;
}
/*</pre>[[Category:Wikipedia toolsscripts]]*/
// </nowiki></pre>
 
[[Category:Wikipedia tools]]