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

Content deleted Content added
Lupin (talk | contribs)
get the namespace too
Miketm (talk | contribs)
mNo edit summary
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 wgPageName.replace(/_/g, ' ');
}
/*</pre>[[Category:Wikipedia tools]]*/
// </nowiki></pre>
 
[[Category:Wikipedia tools]]