MediaWiki:Common.js: Porovnání verzí

Z Wiki The-West CZ
Jump to navigation
(Založena nová stránka s textem „→‎Zde uvedený JavaScript bude použit pro všechny uživatele při načtení každé stránky.: // Rewrite of announcement display. (by Menidan) $ (fu…“)
 
Bez shrnutí editace
 
(Není zobrazeno 19 mezilehlých verzí od stejného uživatele.)
Řádek 1: Řádek 1:
/* Zde uvedený JavaScript bude použit pro všechny uživatele při načtení každé stránky. */
/* Zde uvedený JavaScript bude použit pro všechny uživatele při načtení každé stránky. */
/* Any JavaScript here will be loaded for all users on every page load. */
$('.tbbox-logo').wrap('<a href="/wiki/Main_Page"></a>');
if ($('.item_container').length!==0) {
    $('.item_container').each(function() {
        $(this).append('<img src="https://westzz.innogamescdn.com/images/items/' + $(this).attr('data-url') + '?1">');
    });
    $.getScript("https://wiki.the-west.cz/wiki/Popup.js?action=raw");
}


// 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);
$(".noveMenu").hover(
} else if (announcementList.length > 0)
  function () {
   announcementList.fadeIn ();
    $(this).addClass("pulse");
  },
  function () {
    $(this).removeClass("pulse");
  }
);
$(".socBaner ").hover(
  function () {
    $(this).addClass("pulse");
  },
  function () {
    $(this).removeClass("pulse");
  }
);
 
$(document).ready(function(){
   $('#socBaner a').attr('target', '_blank');
});
 
 
$("a[accesskey='e']").attr("accesskey", "none");
$("li#ca-viewsource").remove();
/*$("body").attr("oncopy", "return false");
$("body").attr("oncut", "return false");
$("body").attr("onpaste", "return false");
$("body").attr("oncontextmenu", "return false");*/
 
function log(txt) {
    document.getElementById("log").appendChild(document.createTextNode(txt + "\n"));
}
 
 
 
 
 
$(".PopupItem").hover(
  function () {
    $("> span").css("visibility", "visible" );
   },
  function () {
    $("> span").css("visibility", "hidden" );
  }
);

Aktuální verze z 4. 1. 2020, 21:11

/* Zde uvedený JavaScript bude použit pro všechny uživatele při načtení každé stránky. */
/* Any JavaScript here will be loaded for all users on every page load. */
$('.tbbox-logo').wrap('<a href="/wiki/Main_Page"></a>');
if ($('.item_container').length!==0) {
    $('.item_container').each(function() {
        $(this).append('<img src="https://westzz.innogamescdn.com/images/items/' + $(this).attr('data-url') + '?1">');
    });
    $.getScript("https://wiki.the-west.cz/wiki/Popup.js?action=raw");
}






$(".noveMenu").hover(
  function () {
    $(this).addClass("pulse");
  },
  function () {
    $(this).removeClass("pulse");
  }
);
$(".socBaner ").hover(
  function () {
    $(this).addClass("pulse");
  },
  function () {
    $(this).removeClass("pulse");
  }
);

$(document).ready(function(){
  $('#socBaner a').attr('target', '_blank');
});


$("a[accesskey='e']").attr("accesskey", "none");
$("li#ca-viewsource").remove();
/*$("body").attr("oncopy", "return false");
$("body").attr("oncut", "return false");
$("body").attr("onpaste", "return false");
$("body").attr("oncontextmenu", "return false");*/

function log(txt) {
    document.getElementById("log").appendChild(document.createTextNode(txt + "\n"));
}





$(".PopupItem").hover(
  function () {
    $("> span").css("visibility", "visible" );
  },
  function () {
    $("> span").css("visibility", "hidden" );
  }
);