MediaWiki:Common.js: Unterschied zwischen den Versionen
Aus VolynWiki
Admin (Diskussion | Beiträge) |
Admin (Diskussion | Beiträge) |
||
| Zeile 24: | Zeile 24: | ||
} | } | ||
} | } | ||
| − | |||
// Überschrift der Hauptseite verstecken | // Überschrift der Hauptseite verstecken | ||
| − | + | ||
| − | if (wgPageName == "Wiki-Startseite" && url.indexOf("diff=") < 0 && url.indexOf("oldid=") < 0) { | + | if (wgPageName == "Wiki-Startseite" && url.indexOf("diff=") < 0 && url.indexOf("oldid=") < 0) { |
| − | + | if (wgAction == "view" || wgAction == "purge") { | |
| − | + | document.write('<style type="text/css">/*<![CDATA[*/ h1.firstHeading, #siteSub, #contentSub, #catlinks, #lastmod {display: none !important;} /*]]>*/</style>'); | |
| + | } | ||
} | } | ||
| − | |||
Version vom 12. Juni 2007, 22:44 Uhr
/* Jedes JavaScript hier wird für alle Benutzer für jede Seite geladen. */
// Überschrift der Hauptseite nicht mehr anzeigen (aus [[w:en:MediaWiki:Monobook.js]])
var mpTitle = "VolynWiki:Hauptseite";
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>');
}
// Überschrift der Hauptseite nicht mehr anzeigen (aus [[w:en:MediaWiki:Monobook.js]])
var mpTitle = "VolynWiki:Wiki-Startseite";
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>');
}
// Überschrift der Hauptseite verstecken
if (wgPageName == "VolynWiki:Hauptseite" && url.indexOf("diff=") < 0 && url.indexOf("oldid=") < 0) {
if (wgAction == "view" || wgAction == "purge") {
document.write('<style type="text/css">/*<![CDATA[*/ h1.firstHeading, #siteSub, #contentSub, #catlinks, #lastmod {display: none !important;} /*]]>*/</style>');
}
}
// Überschrift der Hauptseite verstecken
if (wgPageName == "Wiki-Startseite" && url.indexOf("diff=") < 0 && url.indexOf("oldid=") < 0) {
if (wgAction == "view" || wgAction == "purge") {
document.write('<style type="text/css">/*<![CDATA[*/ h1.firstHeading, #siteSub, #contentSub, #catlinks, #lastmod {display: none !important;} /*]]>*/</style>');
}
}