Wikipedia:WikiProject User scripts/Scripts/Get Page Name: Difference between revisions
Content deleted Content added
m linking source of the code |
m problems and solutions |
||
Line 8:
};
}
</nowiki></pre>▼
/* This code may be problematic when it comes to titles with ampersands, etc, which are stored as ''& amp ;'' in HTML (without the spaces).
A solution that solves this is the following:
return document.title.substr(0, document.title.lastIndexOf(' - Wikipedia, the free'));
*/
▲</nowiki></pre>
|