MediaWiki:Common.js: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
WWWIG (Diskussion | Beiträge) (Anpassung / 1. Test) |
WWWIG (Diskussion | Beiträge) (Klappt doch :-)) |
||
Zeile 27: | Zeile 27: | ||
wgUserLanguage == 'en' || | wgUserLanguage == 'en' || | ||
wgUserLanguage == 'es' || | wgUserLanguage == 'es' || | ||
+ | wgUserLanguage == 'it' || | ||
wgUserLanguage == 'nl' || | wgUserLanguage == 'nl' || | ||
wgUserLanguage == 'ru' ) ) { | wgUserLanguage == 'ru' ) ) { | ||
Zeile 49: | Zeile 50: | ||
cats[i].indexOf( "Kategorie:Galería de imagenes archivo" ) != -1 ) { | cats[i].indexOf( "Kategorie:Galería de imagenes archivo" ) != -1 ) { | ||
if ( wgUserLanguage == 'es' ) catsstring[0] += cats[i] + Trenner; | if ( wgUserLanguage == 'es' ) catsstring[0] += cats[i] + Trenner; | ||
+ | } else | ||
+ | if ( cats[i].indexOf( "Kategorie:Galleria fotografica di modelli orologi" ) != -1 || | ||
+ | cats[i].indexOf( "Kategorie:Galleria fotografica di movimento degli orologi" ) != -1 || | ||
+ | cats[i].indexOf( "Kategorie:Galleria fotografica di Archivio" ) != -1 ) { | ||
+ | if ( wgUserLanguage == 'it' ) catsstring[0] += cats[i] + Trenner; | ||
} else | } else | ||
if ( cats[i].indexOf( "Kategorie:Afbeeldingen galerij uurwerkmodellen" ) != -1 || | if ( cats[i].indexOf( "Kategorie:Afbeeldingen galerij uurwerkmodellen" ) != -1 || | ||
Zeile 54: | Zeile 60: | ||
cats[i].indexOf( "Kategorie:Afbeeldingen galerij archief" ) != -1 ) { | cats[i].indexOf( "Kategorie:Afbeeldingen galerij archief" ) != -1 ) { | ||
if ( wgUserLanguage == 'nl' ) catsstring[0] += cats[i] + Trenner; | if ( wgUserLanguage == 'nl' ) catsstring[0] += cats[i] + Trenner; | ||
− | |||
− | |||
− | |||
− | |||
− | |||
} else | } else | ||
if ( cats[i].indexOf( "Kategorie:Фотогалерея Модели часов" ) != -1 || | if ( cats[i].indexOf( "Kategorie:Фотогалерея Модели часов" ) != -1 || |
Version vom 17. Januar 2013, 06:04 Uhr
/* Das folgende JavaScript wird für alle Benutzer geladen. */ /* ------------------------ */ /* Extra Sysop-Script laden */ /* ------------------------ */ if (window.wgUserGroups) { for (var i = 0; i < wgUserGroups.length; i++) { if (wgUserGroups[i] === 'sysop') { importScript('MediaWiki:CommonSysop.js'); importStylesheet('MediaWiki:CommonSysop.css'); } } } /* --------------------- */ /* Kategorien ausblenden */ /* --------------------- */ addOnloadHook( function () { if ( document.getElementById( 'mw-normal-catlinks' ) && wgUserName && wgCanonicalNamespace == 'File' && ( wgUserLanguage == 'de' || wgUserLanguage == 'en' || wgUserLanguage == 'es' || wgUserLanguage == 'it' || wgUserLanguage == 'nl' || wgUserLanguage == 'ru' ) ) { catsstring = document.getElementById( 'mw-normal-catlinks' ).innerHTML.split( '<ul>' ); if ( catsstring.length > 1 ) { Trenner = '</li>'; cats = catsstring[1].split( Trenner ); catsstring[0] += '<ul>'; for ( var i = 0; i < cats.length; i++ ) { if ( cats[i].indexOf( "Kategorie:Bildgalerie Uhrenmodelle" ) != -1 || cats[i].indexOf( "Kategorie:Bildgalerie Uhrwerke" ) != -1 || cats[i].indexOf( "Kategorie:Bildgalerie Archiv" ) != -1 ) { if ( wgUserLanguage == 'de' ) catsstring[0] += cats[i] + Trenner; } else if ( cats[i].indexOf( "Kategorie:Picture gallery watch models" ) != -1 || cats[i].indexOf( "Kategorie:Picture gallery movements" ) != -1 || cats[i].indexOf( "Kategorie:Picture gallery archive" ) != -1 ) { if ( wgUserLanguage == 'en' ) catsstring[0] += cats[i] + Trenner; } else if ( cats[i].indexOf( "Kategorie:Galería de imagenes de modelos de relojes" ) != -1 || cats[i].indexOf( "Kategorie:Galería de imagenes de mecanismos de relojes" ) != -1 || cats[i].indexOf( "Kategorie:Galería de imagenes archivo" ) != -1 ) { if ( wgUserLanguage == 'es' ) catsstring[0] += cats[i] + Trenner; } else if ( cats[i].indexOf( "Kategorie:Galleria fotografica di modelli orologi" ) != -1 || cats[i].indexOf( "Kategorie:Galleria fotografica di movimento degli orologi" ) != -1 || cats[i].indexOf( "Kategorie:Galleria fotografica di Archivio" ) != -1 ) { if ( wgUserLanguage == 'it' ) catsstring[0] += cats[i] + Trenner; } else if ( cats[i].indexOf( "Kategorie:Afbeeldingen galerij uurwerkmodellen" ) != -1 || cats[i].indexOf( "Kategorie:Afbeeldingen galerij uurwerken" ) != -1 || cats[i].indexOf( "Kategorie:Afbeeldingen galerij archief" ) != -1 ) { if ( wgUserLanguage == 'nl' ) catsstring[0] += cats[i] + Trenner; } else if ( cats[i].indexOf( "Kategorie:Фотогалерея Модели часов" ) != -1 || cats[i].indexOf( "Kategorie:Фотогалерея Часовые механизмы" ) != -1 || cats[i].indexOf( "Kategorie:Фотогалерея Архив" ) != -1 ) { if ( wgUserLanguage == 'ru' ) catsstring[0] += cats[i] + Trenner; } else { catsstring[0] += cats[i] + Trenner; } } document.getElementById( 'mw-normal-catlinks' ).innerHTML = catsstring[0] + '</ul></div>'; } } }); /* ------------------ */ /* Standardfunktionen */ /* ------------------ */ function GetTimeStamp() { var t_now = new Date(); t_GetTimeStamp = ('0000'+t_now.getFullYear()).substr(String(t_now.getFullYear()).length,4)+'-'+('00'+(t_now.getMonth()+1)).substr(String((t_now.getMonth()+1)).length,2)+'-'+('00'+t_now.getDate()).substr(String(t_now.getDate()).length,2)+'T'+ ('00'+t_now.getHours()).substr(String(t_now.getHours()).length,2)+':'+('00'+t_now.getMinutes()).substr(String(t_now.getMinutes()).length,2)+':'+('00'+t_now.getSeconds()).substr(String(t_now.getSeconds()).length,2)+'Z'; return t_GetTimeStamp; } function TransFormText( t_text ) { return t_text.replace(/\&/g, "&").replace(/\</g, "<").replace(/\>/g, ">"); }