Wikipedia:WikiProject User scripts/Scripts/Get Page Name: Difference between revisions
Content deleted Content added
Holly Cheng (talk | contribs) textContent not supported in IE |
Jitse Niesen (talk | contribs) m normalize nowiki comment |
||
Line 1:
Returns the name of the page. For example, if you were browsing the "[[foo]]" WP page, getPname() would return "foo".
// <pre><nowiki>
function getPname() {
z=document.getElementById("content").childNodes;
Line 16:
return document.title.substr(0, document.title.lastIndexOf(' - Wikipedia, the free'));
*/
// </nowiki></pre>
/*
|