MediaWiki:Common.js: Unterschied zwischen den Versionen
Zur Navigation springen
Walmor (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „→Das folgende JavaScript wird für alle Benutzer geladen.: // Rewrite of announcement display. (by Menidan) $ (function () { // Changes the announcemen…“) |
Walmor (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
Zeile 1: | Zeile 1: | ||
/* | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
// Rewrite of announcement display. | // Old Global.js. | ||
// Rewrite of announcement display. | |||
$ (function () { | $ (function () { | ||
// Changes the announcement to the next announcement in the list. | // Changes the announcement to the next announcement in the list. | ||
Zeile 22: | Zeile 23: | ||
} else if (announcementList.length > 0) | } else if (announcementList.length > 0) | ||
announcementList.fadeIn (); | announcementList.fadeIn (); | ||
// Piwik is undefined -> comment it out. | |||
/* | |||
try { | |||
var piwikTracker = Piwik.getTracker (pkBaseURL + "piwik.php", 2); | |||
piwikTracker.trackPageView (); | |||
piwikTracker.enableLinkTracking (); | |||
} catch (err) {} | |||
*/ | |||
}); |
Aktuelle Version vom 2. Juli 2020, 20:42 Uhr
/* Any JavaScript here will be loaded for all users on every page load. */ // Old Global.js. // Rewrite of announcement display. $ (function () { // Changes the announcement to the next announcement in the list. function changeAnnouncement () { $ (announcementList [currentAnnouncement]).fadeOut ("normal", function () { ++currentAnnouncement; if (currentAnnouncement >= announcementList.length) currentAnnouncement = 0; $ (announcementList [currentAnnouncement]).fadeIn (); }); } var announcementList = $ (".announcement"); var currentAnnouncement = 0; var announcementVisibilityTime = 10000; // ms announcementList.hide (); if (announcementList.length > 1) { $ (announcementList [0]).fadeIn (); setInterval (changeAnnouncement, announcementVisibilityTime); } else if (announcementList.length > 0) announcementList.fadeIn (); // Piwik is undefined -> comment it out. /* try { var piwikTracker = Piwik.getTracker (pkBaseURL + "piwik.php", 2); piwikTracker.trackPageView (); piwikTracker.enableLinkTracking (); } catch (err) {} */ });