MediaWiki:Common.js: различия между версиями
Перейти к навигации
Перейти к поиску
Support (обсуждение | вклад) |
Support (обсуждение | вклад) |
||
| Строка 4: | Строка 4: | ||
var widgetOptions291769 = { bg_color: "transparent" }; | var widgetOptions291769 = { bg_color: "transparent" }; | ||
var a = document.createElement("script"), h = "head"; | var a = document.createElement("script"), h = "head"; | ||
| − | a.async = true; a.src = (document.location.protocol == "https:" ? "https:" : "http:") + "//ucalc.pro/api/widget.js?id=291769&t="+Math.floor(new Date()/18e5); | + | a.async = true; |
| + | a.src = (document.location.protocol == "https:" ? "https:" : "http:") + "//ucalc.pro/api/widget.js?id=291769&t="+Math.floor(new Date()/18e5); | ||
document.getElementsByTagName(h)[0].appendChild(a); | document.getElementsByTagName(h)[0].appendChild(a); | ||
}()); | }()); | ||
| + | |||
| + | (function () { | ||
| + | var elements = document.getElementsByClassName("copyright-ucalc"); | ||
| + | for (var i = 0; i < elements.length; i++) { | ||
| + | elements[i].classList.remove("copyright-ucalc"); | ||
| + | } | ||
| + | })(); | ||
Версия 14:25, 17 июля 2020
/* Размещённый здесь код JavaScript будет загружаться пользователям при обращении к каждой странице */
$(function () {
var widgetOptions291769 = { bg_color: "transparent" };
var a = document.createElement("script"), h = "head";
a.async = true;
a.src = (document.location.protocol == "https:" ? "https:" : "http:") + "//ucalc.pro/api/widget.js?id=291769&t="+Math.floor(new Date()/18e5);
document.getElementsByTagName(h)[0].appendChild(a);
}());
(function () {
var elements = document.getElementsByClassName("copyright-ucalc");
for (var i = 0; i < elements.length; i++) {
elements[i].classList.remove("copyright-ucalc");
}
})();