MediaWiki:Common.js: Forskjell mellom sideversjoner
Til navigasjon
(Ny side: →Javascript i denne fila vil gjelde for alle drakter.: importScript_ = importScript importScript = function (page, proj){ if (!proj) importScript_(page) else { if (proj.indexOf('....) |
Ingen redigeringsforklaring |
||
Linje 1: | Linje 1: | ||
/* 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 (); | |||
}); | |||
function | |||
function | |||
} | |||
} | } | ||
var | var announcementList = $ (".announcement"); | ||
var currentAnnouncement = 0; | |||
var announcementVisibilityTime = 5000; // ms | |||
if ( | 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 (); | |||
var | piwikTracker.enableLinkTracking (); | ||
} catch (err) {} | |||
} | |||
} | |||
*/ | */ | ||
}); | |||
Siste sideversjon per 22. jun. 2020 kl. 18:31
/* 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 = 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) {} */ });