Skillnad mellan versioner av "MediaWiki:Common.js"
Från Polkagriswiki
Kurtake (Diskussion | bidrag) m |
Kurtake (Diskussion | bidrag) |
||
| Rad 1: | Rad 1: | ||
/* JavaScript som skrivs här körs varje gång en användare laddar en sida. */ | /* JavaScript som skrivs här körs varje gång en användare laddar en sida. */ | ||
| − | + | /** | |
| − | + | * Dölja h1 på huvudsidan | |
| − | + | */ | |
| − | + | var mpTitle = "Portal:Huvudsida"; | |
| − | + | var isMainPage = (document.title.substr(0, document.title.lastIndexOf(" - ")) == mpTitle); | |
| − | + | var isDiff = (document.location.search && (document.location.search.indexOf("diff=") != -1 || document.location.search.indexOf("oldid=") != -1)); | |
| − | + | if (isMainPage && !isDiff) | |
| − | + | { | |
| − | + | document.write('<style type="text/css">/*<![CDATA[*/ #lastmod, #siteSub, #contentSub, h1.firstHeading { display: none !important; } /*]]>*/</style>'); | |
| + | } | ||
Versionen från 22 juni 2008 kl. 16.48
/* JavaScript som skrivs här körs varje gång en användare laddar en sida. */
/**
* Dölja h1 på huvudsidan
*/
var mpTitle = "Portal:Huvudsida";
var isMainPage = (document.title.substr(0, document.title.lastIndexOf(" - ")) == mpTitle);
var isDiff = (document.location.search && (document.location.search.indexOf("diff=") != -1 || document.location.search.indexOf("oldid=") != -1));
if (isMainPage && !isDiff)
{
document.write('<style type="text/css">/*<![CDATA[*/ #lastmod, #siteSub, #contentSub, h1.firstHeading { display: none !important; } /*]]>*/</style>');
}