MediaWiki:Common.js: verschil tussen versies
Naar navigatie springen
Geen bewerkingssamenvatting |
Geen bewerkingssamenvatting |
||
Regel 1: | Regel 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
$ (function () { | $ (function () { | ||
// Changes the announcement to the next announcement in the list. | // Changes the announcement to the next announcement in the list. | ||
Regel 31: | Regel 30: | ||
piwikTracker.enableLinkTracking (); | piwikTracker.enableLinkTracking (); | ||
} catch (err) {} | } catch (err) {} | ||
Versie van 25 nov 2017 14:18
/* Any JavaScript here will be loaded for all users on every page load. */ $ (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 = 5000; // 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) {}