Нет описания правки Метка: sourceedit |
Нет описания правки |
||
Строка 4: | Строка 4: | ||
var AjaxRCRefreshText = 'Автообновление страницы'; |
var AjaxRCRefreshText = 'Автообновление страницы'; |
||
var PurgeButtonText = 'Обновить'; |
var PurgeButtonText = 'Обновить'; |
||
+ | |||
+ | var wgSkin = "wikia"; |
||
+ | |||
+ | |||
+ | |||
+ | /******************** |
||
+ | * Случайный фон * |
||
+ | * by Kopcap94 * |
||
+ | ********************/ |
||
+ | |||
+ | document.addEventListener("DOMContentLoaded", function(event){ |
||
+ | var imgs = [ |
||
+ | 'https://vignette.wikia.nocookie.net/hollowknight/images/0/0e/HK_Bckgrnd.png/revision/latest?cb=20170401204752&path-prefix=ru', |
||
+ | 'https://vignette.wikia.nocookie.net/hollowknight/images/3/3a/Background_hk_3.png/revision/latest?cb=20180217185654&path-prefix=ru', |
||
+ | 'https://vignette.wikia.nocookie.net/hollowknight/images/4/44/Background_hk_2.png/revision/latest?cb=20180217185654&path-prefix=ru', |
||
+ | 'https://vignette.wikia.nocookie.net/hollowknight/images/4/40/Background_hk_1.png/revision/latest?cb=20180217185653&path-prefix=ru' |
||
+ | ]; |
||
+ | |||
+ | /* |
||
+ | $('body.skin-oasis').attr('style', 'background-image:url(' + imgs[Math.floor((imgs.length) * Math.random())] + ') !important'); |
||
+ | }); |
||
+ | */ |
||
+ | |||
+ | document.getElementsByTagName("body")[0] |
||
+ | .setAttribute("style", 'background-image:url(' |
||
+ | + imgs[Math.floor((imgs.length) * Math.random())] + ') !important'); |
||
+ | |||
+ | }); |
||
+ | /********************/ |
Версия от 19:04, 17 февраля 2018
importScriptPage('MediaWiki:AjaxRC/code.js', 'dev');
// AjaxRC configuration
var ajaxPages = ["Special:Watchlist", "Special:Contributions", "Special:WikiActivity", "Special:RecentChanges", "Служебная:Watchlist", "Служебная:Contributions", "Служебная:WikiActivity", "Служебная:RecentChanges"];
var AjaxRCRefreshText = 'Автообновление страницы';
var PurgeButtonText = 'Обновить';
var wgSkin = "wikia";
/********************
* Случайный фон *
* by Kopcap94 *
********************/
document.addEventListener("DOMContentLoaded", function(event){
var imgs = [
'https://vignette.wikia.nocookie.net/hollowknight/images/0/0e/HK_Bckgrnd.png/revision/latest?cb=20170401204752&path-prefix=ru',
'https://vignette.wikia.nocookie.net/hollowknight/images/3/3a/Background_hk_3.png/revision/latest?cb=20180217185654&path-prefix=ru',
'https://vignette.wikia.nocookie.net/hollowknight/images/4/44/Background_hk_2.png/revision/latest?cb=20180217185654&path-prefix=ru',
'https://vignette.wikia.nocookie.net/hollowknight/images/4/40/Background_hk_1.png/revision/latest?cb=20180217185653&path-prefix=ru'
];
/*
$('body.skin-oasis').attr('style', 'background-image:url(' + imgs[Math.floor((imgs.length) * Math.random())] + ') !important');
});
*/
document.getElementsByTagName("body")[0]
.setAttribute("style", 'background-image:url('
+ imgs[Math.floor((imgs.length) * Math.random())] + ') !important');
});
/********************/