Innobár.png


Twsbár.png
Twbár.png
Gpbár.png
Foebár.png
Elvenarbár.png
Innogames minilogo.png
From Tribalwars2 EN Wiki
Revision as of 14:47, 17 September 2014 by - TyRioN BlacK - (talk | contribs) (Created page with "→‎Any JavaScript here will be loaded for all users on every page load.: */ // Rewrite of announcement display. (by Menidan) $ (function () { // Changes the announcement t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/* Any JavaScript here will be loaded for all users on every page load. */
*/

// Rewrite of announcement display. (by Menidan)
$ (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) {}
 */
});

// ?
var importScript_ = importScript;