Jump to content

User:Ioeth/friendlytabs.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ioeth (talk | contribs) at 16:17, 22 November 2007 (Updated script). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
var idsToRename = [
	{
		name: 'ca-nstab-help',
		text: 'Help' },
	{
		name: 'ca-nstab-special',
		text: 'Special' },
	{
		name: 'ca-nstab-project',
		text: 'Project' },
	{
		name: 'ca-nstab-user',
		text: 'User' },
	{
		name: 'ca-edit',
		text: 'Edit' },
	{
		name: 'ca-viewsource',
		text: 'Source' },
	{
		name: 'ca-talk',
		text: 'Talk' }
];
 
function fixtabs() 
{
	if(document.getElementById('ca-nstab-main') && document.getElementById('ca-nstab-main').firstChild.innerHTML == 'Main Page') {
		document.getElementById('ca-nstab-main').firstChild.innerHTML = 'main';
	}
	for(i = 0; i < idsToRename.length; i++) {
		if(document.getElementById(idsToRename[i].name)) {
			document.getElementById(idsToRename[i].name).firstChild.innerHTML = idsToRename[i].text;
		}
	}
}
 
addOnloadHook(fixtabs);