舰R百科是靠无数自愿编辑者持续地建设更新完善的。编辑非常简单,无需代码知识,请勇于更新页面!
编辑入门 | 资助百科 | 留言讨论页 | 微博@舰R百科 | 百科编辑讨论Q群:366818861

MediaWiki:Common.js:修订间差异

来自舰R百科
跳转到导航 跳转到搜索
无编辑摘要
无编辑摘要
 
(未显示同一用户的7个中间版本)
第1行: 第1行:
/* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */
// /* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */




/* 显示存在的配音文件的播放按钮 */
// /* 显示存在的配音文件的播放按钮 */
$(document).ready(function () {
// $(document).ready(function () {
     var players = document.getElementsByClassName('flat');
//     var players = document.getElementsByClassName('flat');
     for (var i = 0; i < players.length; i++) {
//     for (var i = 0; i < players.length; i++) {
         url = players[i].lastChild.href;
//         url = players[i].lastChild.href;
         $.ajax({
//         $.ajax({
             url: url,
//             url: url,
             context: players[i],
//             context: players[i],
             type: 'HEAD',
//             type: 'HEAD',
             success: function () {
//             success: function () {
                 this.style.cssText = "display: inline;";
//                 this.style.cssText = "display: inline;";
             }
//             }
         });         
//         });         
     }
//     }
});
// });


/* 随机选择背景 */
// /* 随机选择背景 */
// var bg_links = ['url(https://i.loli.net/2020/01/19/31GwqBplCKDaMHW.jpg)', 'url(https://i.loli.net/2020/01/19/PpvFBOdT8DArt47.jpg)', "url(https://i.loli.net/2020/09/27/h86Nc4AIsmLb1Vi.jpg)", "url(https://i.loli.net/2021/09/23/LIqwG9c5xDQCY4Z.jpg)", "url(https://s2.loli.net/2022/11/06/XSB5YxF3ao2f7ZT.jpg)"];
// // var bg_links = ['url(https://i.loli.net/2020/01/19/31GwqBplCKDaMHW.jpg)', 'url(https://i.loli.net/2020/01/19/PpvFBOdT8DArt47.jpg)', "url(https://i.loli.net/2020/09/27/h86Nc4AIsmLb1Vi.jpg)", "url(https://i.loli.net/2021/09/23/LIqwG9c5xDQCY4Z.jpg)", "url(https://s2.loli.net/2022/11/06/XSB5YxF3ao2f7ZT.jpg)"];
function weightedRandomSelection(items) {
// function weightedRandomSelection(items) {
   // Calculate the total weight of all items.
//   // Calculate the total weight of all items.
   var totalWeight = 0;
//   var totalWeight = 0;
   for (var i = 0; i < items.length; i++) {
//   for (var i = 0; i < items.length; i++) {
     totalWeight += items[i][1];
//     totalWeight += items[i][1];
   }
//   }


   // Generate a random value between 0 and the total weight.
//   // Generate a random value between 0 and the total weight.
   var randomValue = Math.random() * totalWeight;
//   var randomValue = Math.random() * totalWeight;


   // Iterate over the items, keeping track of the current weight.
//   // Iterate over the items, keeping track of the current weight.
   var currentWeight = 0;
//   var currentWeight = 0;
   for (i = 0; i < items.length; i++) {
//   for (i = 0; i < items.length; i++) {
     currentWeight += items[i][1];
//     currentWeight += items[i][1];


     // If the current weight is greater than or equal to the random value, return the item.
//     // If the current weight is greater than or equal to the random value, return the item.
     if (currentWeight >= randomValue) {
//     if (currentWeight >= randomValue) {
       return items[i][0];
//       return items[i][0];
     }
//     }
   }
//   }


   // If we reach here, it means that the random value was greater than the total weight, which should never happen.
//   // If we reach here, it means that the random value was greater than the total weight, which should never happen.
   console.log(currentWeight, randomValue);
//   console.log(currentWeight, randomValue);
   throw new Error("Random value was greater than total weight.");
//   throw new Error("Random value was greater than total weight.");
}
// }


var bg_links = [
// var bg_links = [
   ['url(https://0v0.zjsnrwiki.com/static/bg_4.webp)', 0.16],
// ['url(https://0v0.zjsnrwiki.com/static/bg_L.webp)', 0.005],
   ['url(https://0v0.zjsnrwiki.com/static/bg_5.webp)', 0.16],
//   ['url(https://0v0.zjsnrwiki.com/static/bg_4.webp)', 0.2],
   ['url(https://0v0.zjsnrwiki.com/static/bg_6.webp)', 0.16],
//   ['url(https://0v0.zjsnrwiki.com/static/bg_5.webp)', 0.2],
   ['url(https://0v0.zjsnrwiki.com/static/bg_7.webp)', 0.16],
//   ['url(https://0v0.zjsnrwiki.com/static/bg_6.webp)', 0.2],
   ['url(https://0v0.zjsnrwiki.com/static/bg_8a.webp)', 0.16],
//   ['url(https://0v0.zjsnrwiki.com/static/bg_7.webp)', 0.2],
   ['url(https://0v0.zjsnrwiki.com/static/bg_8b.webp)', 0.16],
//   ['url(https://0v0.zjsnrwiki.com/static/bg_8a.webp)', 0.2], ['url(https://0v0.zjsnrwiki.com/static/bg_8b.webp)', 0.005],
];
//   ['url(https://0v0.zjsnrwiki.com/static/bg_9a.webp)', 0.2], ['url(https://0v0.zjsnrwiki.com/static/bg_9b.webp)', 0.005],
var random_bg_link = weightedRandomSelection(bg_links);
// ];
console.log(random_bg_link);
// var random_bg_link = weightedRandomSelection(bg_links);
$('body.skin-vector').css('background',random_bg_link[0]);
// console.log(random_bg_link);
$('body.skin-vector').css('background-position', 'centre');
// $('body.skin-vector').css('background',random_bg_link);
$('body.skin-vector').css('background-repeat', 'no-repeat');
// $('body.skin-vector').css('background-position', 'centre');
$('body.skin-vector').css('background-size', 'cover');
// $('body.skin-vector').css('background-repeat', 'no-repeat');
$('body.skin-vector').css('background-attachment', 'fixed');
// $('body.skin-vector').css('background-size', 'cover');
// $('body.skin-vector').css('background-attachment', 'fixed');


$('body.skin-citizen').css('background', random_bg_link[0]);
// $('body.skin-citizen').css('background', random_bg_link);
$('body.skin-citizen').css('background-position', 'centre');
// $('body.skin-citizen').css('background-position', 'centre');
$('body.skin-citizen').css('background-repeat', 'no-repeat');
// $('body.skin-citizen').css('background-repeat', 'no-repeat');
$('body.skin-citizen').css('background-size', 'cover');
// $('body.skin-citizen').css('background-size', 'cover');
$('body.skin-citizen').css('background-attachment', 'fixed');
// $('body.skin-citizen').css('background-attachment', 'fixed');




/* 切换立绘按钮(当前作废) */
// /* 切换立绘按钮(当前作废) */
$(document).ready(function () {
// $(document).ready(function () {
     $("#btn_2").click(function () {
//     $("#btn_2").click(function () {
         $("#btn_1, #btn_2").hide();
//         $("#btn_1, #btn_2").hide();
         $("#btn_3, #btn_4").show();
//         $("#btn_3, #btn_4").show();
     });
//     });
     $("#btn_3").click(function () {
//     $("#btn_3").click(function () {
         $("#btn_1, #btn_3").hide();
//         $("#btn_1, #btn_3").hide();
         $("#btn_2, #btn_4").show();
//         $("#btn_2, #btn_4").show();
     });
//     });
     $("#btn_4").click(function () {
//     $("#btn_4").click(function () {
         $("#btn_1, #btn_4").hide();
//         $("#btn_1, #btn_4").hide();
         $("#btn_2, #btn_3").show();
//         $("#btn_2, #btn_3").show();
     });
//     });
     $("#btn_5").click(function () {
//     $("#btn_5").click(function () {
         $("#btn_1, #btn_2, #btn_3, #btn_4").show();
//         $("#btn_1, #btn_2, #btn_3, #btn_4").show();
     });
//     });
});
// });


/* Countdown */
// /* Countdown */
// __NOWYSIWYG__ <source lang="javascript">
// // __NOWYSIWYG__ <source lang="javascript">
/**
// /**
* Countdown
// * Countdown
*
// *
* @version 2.1
// * @version 2.1
*
// *
* @author Pecoes <http://c.wikia.com/wiki/User:Pecoes>
// * @author Pecoes <http://c.wikia.com/wiki/User:Pecoes>
* @author Asaba <http://dev.wikia.com/wiki/User:Asaba>
// * @author Asaba <http://dev.wikia.com/wiki/User:Asaba>
*
// *
* Version 1 authors:
// * Version 1 authors:
* - Splarka <http://c.wikia.com/wiki/User:Splarka>
// * - Splarka <http://c.wikia.com/wiki/User:Splarka>
* - Eladkse <http://c.wikia.com/wiki/User:Eladkse>
// * - Eladkse <http://c.wikia.com/wiki/User:Eladkse>
*
// *
* documentation and examples at:
// * documentation and examples at:
* <http://dev.wikia.com/wiki/Countdown>
// * <http://dev.wikia.com/wiki/Countdown>
*/
// */


/*jshint jquery:true, browser:true, devel:true, camelcase:true, curly:false, undef:true, bitwise:true, eqeqeq:true, forin:true, immed:true, latedef:true, newcap:true, noarg:true, unused:true, regexp:true, strict:true, trailing:false */
// /*jshint jquery:true, browser:true, devel:true, camelcase:true, curly:false, undef:true, bitwise:true, eqeqeq:true, forin:true, immed:true, latedef:true, newcap:true, noarg:true, unused:true, regexp:true, strict:true, trailing:false */
/*global mediaWiki:true*/
// /*global mediaWiki:true*/


(function (module, mw, $, undefined) {
// (function (module, mw, $, undefined) {


     'use strict';
//     'use strict';


     var translations = {};
//     var translations = {};
     $.extend(translations, {
//     $.extend(translations, {
         // Catalan (Català)
//         // Catalan (Català)
         ca: {
//         ca: {
             and: 'i',
//             and: 'i',
             second: 'segon',
//             second: 'segon',
             seconds: 'segons',
//             seconds: 'segons',
             minute: 'minut',
//             minute: 'minut',
             minutes: 'minuts',
//             minutes: 'minuts',
             hour: 'hora',
//             hour: 'hora',
             hours: 'hores',
//             hours: 'hores',
             day: 'dia',
//             day: 'dia',
             days: 'dies'
//             days: 'dies'
         },
//         },
         // German (Deutsch)
//         // German (Deutsch)
         de: {
//         de: {
             and: 'und',
//             and: 'und',
             second: 'Sekunde',
//             second: 'Sekunde',
             seconds: 'Sekunden',
//             seconds: 'Sekunden',
             minute: 'Minute',
//             minute: 'Minute',
             minutes: 'Minuten',
//             minutes: 'Minuten',
             hour: 'Stunde',
//             hour: 'Stunde',
             hours: 'Stunden',
//             hours: 'Stunden',
             day: 'Tag',
//             day: 'Tag',
             days: 'Tage'
//             days: 'Tage'
         },
//         },
         // English (English)
//         // English (English)
         en: {
//         en: {
             and: 'and',
//             and: 'and',
             second: 'second',
//             second: 'second',
             seconds: 'seconds',
//             seconds: 'seconds',
             minute: 'minute',
//             minute: 'minute',
             minutes: 'minutes',
//             minutes: 'minutes',
             hour: 'hour',
//             hour: 'hour',
             hours: 'hours',
//             hours: 'hours',
             day: 'day',
//             day: 'day',
             days: 'days'
//             days: 'days'
         },
//         },
         // Greek (Ελληνικά)
//         // Greek (Ελληνικά)
         el: {
//         el: {
             and: 'και',
//             and: 'και',
             second: 'δευτερόλεπτο',
//             second: 'δευτερόλεπτο',
             seconds: 'δεπτερόλεπτα',
//             seconds: 'δεπτερόλεπτα',
             minute: 'λετπό',
//             minute: 'λετπό',
             minutes: 'λεπτά',
//             minutes: 'λεπτά',
             hour: '΄΄ωρα',
//             hour: '΄΄ωρα',
             hours: 'ώρες',
//             hours: 'ώρες',
             day: 'ημέρα',
//             day: 'ημέρα',
             days: 'ημέρες'
//             days: 'ημέρες'
         },
//         },
         // Spanish (Español)
//         // Spanish (Español)
         es: {
//         es: {
             and: 'y',
//             and: 'y',
             second: 'segundo',
//             second: 'segundo',
             seconds: 'segundos',
//             seconds: 'segundos',
             minute: 'minuto',
//             minute: 'minuto',
             minutes: 'minutos',
//             minutes: 'minutos',
             hour: 'hora',
//             hour: 'hora',
             hours: 'horas',
//             hours: 'horas',
             day: 'día',
//             day: 'día',
             days: 'días'
//             days: 'días'
         },
//         },
         // French (Français)
//         // French (Français)
         fr: {
//         fr: {
             and: 'et',
//             and: 'et',
             second: 'seconde',
//             second: 'seconde',
             seconds: 'secondes',
//             seconds: 'secondes',
             minute: 'minute',
//             minute: 'minute',
             minutes: 'minutes',
//             minutes: 'minutes',
             hour: 'heure',
//             hour: 'heure',
             hours: 'heures',
//             hours: 'heures',
             day: 'jour',
//             day: 'jour',
             days: 'jours'
//             days: 'jours'
         },
//         },
         // Hungarian (Magyar)
//         // Hungarian (Magyar)
         hu: {
//         hu: {
             and: 'és',
//             and: 'és',
             second: 'másodperc',
//             second: 'másodperc',
             seconds: 'másodperc',
//             seconds: 'másodperc',
             minute: 'perc',
//             minute: 'perc',
             minutes: 'perc',
//             minutes: 'perc',
             hour: 'óra',
//             hour: 'óra',
             hours: 'óra',
//             hours: 'óra',
             day: 'nap',
//             day: 'nap',
             days: 'nap'
//             days: 'nap'
         },
//         },
         // Italian (Italiano)
//         // Italian (Italiano)
         it: {
//         it: {
             and: 'e',
//             and: 'e',
             second: 'secondo',
//             second: 'secondo',
             seconds: 'secondi',
//             seconds: 'secondi',
             minute: 'minuto',
//             minute: 'minuto',
             minutes: 'minuti',
//             minutes: 'minuti',
             hour: 'ora',
//             hour: 'ora',
             hours: 'ore',
//             hours: 'ore',
             day: 'giorno',
//             day: 'giorno',
             days: 'giorni'
//             days: 'giorni'
         },
//         },
         // Japanese (日本語)
//         // Japanese (日本語)
         ja: {
//         ja: {
             and: '',
//             and: '',
             second: '秒',
//             second: '秒',
             seconds: '秒',
//             seconds: '秒',
             minute: '分',
//             minute: '分',
             minutes: '分',
//             minutes: '分',
             hour: '時間',
//             hour: '時間',
             hours: '時間',
//             hours: '時間',
             day: '日',
//             day: '日',
             days: '日'
//             days: '日'
         },
//         },
         // Malay (Bahasa Melayu)
//         // Malay (Bahasa Melayu)
         ms: {
//         ms: {
             and: 'dan',
//             and: 'dan',
             second: 'saat',
//             second: 'saat',
             seconds: 'saat',
//             seconds: 'saat',
             minute: 'minit',
//             minute: 'minit',
             minutes: 'minit',
//             minutes: 'minit',
             hour: 'jam',
//             hour: 'jam',
             hours: 'jam',
//             hours: 'jam',
             day: 'hari',
//             day: 'hari',
             days: 'hari'
//             days: 'hari'
         },
//         },
         // Dutch (Nederlands)
//         // Dutch (Nederlands)
         nl: {
//         nl: {
             and: 'en',
//             and: 'en',
             second: 'seconde',
//             second: 'seconde',
             seconds: 'seconden',
//             seconds: 'seconden',
             minute: 'minuut',
//             minute: 'minuut',
             minutes: 'minuten',
//             minutes: 'minuten',
             hour: 'uur',
//             hour: 'uur',
             hours: 'uur',
//             hours: 'uur',
             day: 'dag',
//             day: 'dag',
             days: 'dagen'
//             days: 'dagen'
         },
//         },
         // Polish (Polski)
//         // Polish (Polski)
         pl: {
//         pl: {
             and: 'i',
//             and: 'i',
             second: 'sekunda',
//             second: 'sekunda',
             seconds: 'sekund(y)',
//             seconds: 'sekund(y)',
             minute: 'minuta',
//             minute: 'minuta',
             minutes: 'minut(y)',
//             minutes: 'minut(y)',
             hour: 'godzina',
//             hour: 'godzina',
             hours: 'godzin(y)',
//             hours: 'godzin(y)',
             day: 'dzień',
//             day: 'dzień',
             days: 'dni'
//             days: 'dni'
         },
//         },
         // Portuguese (Português)
//         // Portuguese (Português)
         pt: {
//         pt: {
             and: 'e',
//             and: 'e',
             second: 'segundo',
//             second: 'segundo',
             seconds: 'segundos',
//             seconds: 'segundos',
             minute: 'minuto',
//             minute: 'minuto',
             minutes: 'minutos',
//             minutes: 'minutos',
             hour: 'hora',
//             hour: 'hora',
             hours: 'horas',
//             hours: 'horas',
             day: 'dia',
//             day: 'dia',
             days: 'dias'
//             days: 'dias'


         },
//         },
         // Brazilian Portuguese (Português do Brasil)
//         // Brazilian Portuguese (Português do Brasil)
         'pt-br': {
//         'pt-br': {
             and: 'e',
//             and: 'e',
             second: 'segundo',
//             second: 'segundo',
             seconds: 'segundos',
//             seconds: 'segundos',
             minute: 'minuto',
//             minute: 'minuto',
             minutes: 'minutos',
//             minutes: 'minutos',
             hour: 'hora',
//             hour: 'hora',
             hours: 'horas',
//             hours: 'horas',
             day: 'dia',
//             day: 'dia',
             days: 'dias'
//             days: 'dias'


         },
//         },
         // Russian (русский)
//         // Russian (русский)
         ru: {
//         ru: {
             and: 'и',
//             and: 'и',
             second: 'секунда',
//             second: 'секунда',
             seconds: 'секунд',
//             seconds: 'секунд',
             minute: 'минута',
//             minute: 'минута',
             minutes: 'минут',
//             minutes: 'минут',
             hour: 'час',
//             hour: 'час',
             hours: 'часов',
//             hours: 'часов',
             day: 'день',
//             day: 'день',
             days: 'дней'
//             days: 'дней'
         },
//         },
         // Serbian (српски језик)
//         // Serbian (српски језик)
         sr: {
//         sr: {
             and: 'i',
//             and: 'i',
             second: 'sekundu',
//             second: 'sekundu',
             seconds: 'sekunde/-i',
//             seconds: 'sekunde/-i',
             minute: 'minutu',
//             minute: 'minutu',
             minutes: 'minute/-a',
//             minutes: 'minute/-a',
             hour: 'sat',
//             hour: 'sat',
             hours: 'sata/-i',
//             hours: 'sata/-i',
             day: 'dan',
//             day: 'dan',
             days: 'dana'
//             days: 'dana'
         },
//         },
         // Vietnamese (Tiếng Việt)
//         // Vietnamese (Tiếng Việt)
         vi: {
//         vi: {
             and: 'và',
//             and: 'và',
             second: 'giây',
//             second: 'giây',
             seconds: 'giây',
//             seconds: 'giây',
             minute: 'phút',
//             minute: 'phút',
             minutes: 'phút',
//             minutes: 'phút',
             hour: 'giờ',
//             hour: 'giờ',
             hours: 'giờ',
//             hours: 'giờ',
             day: 'ngày',
//             day: 'ngày',
             days: 'ngày'
//             days: 'ngày'
         },
//         },
         // Chinese (中文)
//         // Chinese (中文)
         zh: {
//         zh: {
             and: ' ',
//             and: ' ',
             second: '秒',
//             second: '秒',
             seconds: '秒',
//             seconds: '秒',
             minute: '分',
//             minute: '分',
             minutes: '分',
//             minutes: '分',
             hour: '小时',
//             hour: '小时',
             hours: '小时',
//             hours: '小时',
             day: '天',
//             day: '天',
             days: '天'
//             days: '天'
         }
//         }
     }, module.translations || {});
//     }, module.translations || {});
     var countdowns = [],
//     var countdowns = [],
         i18n = translations[
//         i18n = translations[
             mw.config.get('wgContentLanguage')
//             mw.config.get('wgContentLanguage')
         ] || translations.zh,
//         ] || translations.zh,
         NO_LEADING_ZEROS = 1;
//         NO_LEADING_ZEROS = 1;


     function output(i, diff) {
//     function output(i, diff) {
         /*jshint bitwise:false*/
//         /*jshint bitwise:false*/
         var delta, result, parts = [];
//         var delta, result, parts = [];
         delta = diff % 60;
//         delta = diff % 60;
         parts.unshift(delta + ' ' + i18n[delta === 1 ? 'second' : 'seconds']);
//         parts.unshift(delta + ' ' + i18n[delta === 1 ? 'second' : 'seconds']);
         diff = Math.floor(diff / 60);
//         diff = Math.floor(diff / 60);
         delta = diff % 60;
//         delta = diff % 60;
         parts.unshift(delta + ' ' + i18n[delta === 1 ? 'minute' : 'minutes']);
//         parts.unshift(delta + ' ' + i18n[delta === 1 ? 'minute' : 'minutes']);
         diff = Math.floor(diff / 60);
//         diff = Math.floor(diff / 60);
         delta = diff % 24;
//         delta = diff % 24;
         parts.unshift(delta + ' ' + i18n[delta === 1 ? 'hour' : 'hours']);
//         parts.unshift(delta + ' ' + i18n[delta === 1 ? 'hour' : 'hours']);
         diff = Math.floor(diff / 24);
//         diff = Math.floor(diff / 24);
         parts.unshift(diff + ' ' + i18n[diff === 1 ? 'day' : 'days']);
//         parts.unshift(diff + ' ' + i18n[diff === 1 ? 'day' : 'days']);
         result = parts.pop();
//         result = parts.pop();
         if (countdowns[i].opts & NO_LEADING_ZEROS) {
//         if (countdowns[i].opts & NO_LEADING_ZEROS) {
             while (parts.length && parts[0][0] === '0') {
//             while (parts.length && parts[0][0] === '0') {
                 parts.shift();
//                 parts.shift();
             }
//             }
         }
//         }
         if (parts.length) {
//         if (parts.length) {
             result = parts.join(', ') + ' ' + i18n.and + ' ' + result;
//             result = parts.join(', ') + ' ' + i18n.and + ' ' + result;
         }
//         }
         countdowns[i].node.text(result);
//         countdowns[i].node.text(result);
     }
//     }


     function end(i) {
//     function end(i) {
         var c = countdowns[i].node.parent();
//         var c = countdowns[i].node.parent();
         switch (c.attr('data-end')) {
//         switch (c.attr('data-end')) {
             case 'remove':
//             case 'remove':
                 c.remove();
//                 c.remove();
                 return true;
//                 return true;
             case 'stop':
//             case 'stop':
                 output(i, 0);
//                 output(i, 0);
                 return true;
//                 return true;
             case 'toggle':
//             case 'toggle':
                 var toggle = c.attr('data-toggle');
//                 var toggle = c.attr('data-toggle');
                 if (toggle && $(toggle).length) {
//                 if (toggle && $(toggle).length) {
                     $(toggle).css('display', 'inline');
//                     $(toggle).css('display', 'inline');
                     c.css('display', 'none');
//                     c.css('display', 'none');
                     return true;
//                     return true;
                 }
//                 }
                 break;
//                 break;
             case 'callback':
//             case 'callback':
                 var callback = c.attr('data-callback');
//                 var callback = c.attr('data-callback');
                 if (callback && $.isFunction(module[callback])) {
//                 if (callback && $.isFunction(module[callback])) {
                     output(i, 0);
//                     output(i, 0);
                     module[callback].call(c);
//                     module[callback].call(c);
                     return true;
//                     return true;
                 }
//                 }
                 break;
//                 break;
         }
//         }
         countdowns[i].countup = true;
//         countdowns[i].countup = true;
         output(i, 0);
//         output(i, 0);
         return false;
//         return false;
     }
//     }


     function update() {
//     function update() {
         var now = Date.now();
//         var now = Date.now();
         var countdownsToRemove = [];
//         var countdownsToRemove = [];
         $.each(countdowns.slice(0), function (i, countdown) {
//         $.each(countdowns.slice(0), function (i, countdown) {
             var diff = Math.floor((countdown.date - now) / 1000);
//             var diff = Math.floor((countdown.date - now) / 1000);
             if (diff <= 0 && !countdown.countup) {
//             if (diff <= 0 && !countdown.countup) {
                 if (end(i)) countdownsToRemove.push(i);
//                 if (end(i)) countdownsToRemove.push(i);
             } else {
//             } else {
                 output(i, Math.abs(diff));
//                 output(i, Math.abs(diff));
             }
//             }
         });
//         });
         var x;
//         var x;
         while ((x = countdownsToRemove.pop()) !== undefined) {
//         while ((x = countdownsToRemove.pop()) !== undefined) {
             countdowns.splice(x, 1);
//             countdowns.splice(x, 1);
         }
//         }
         if (countdowns.length) {
//         if (countdowns.length) {
             window.setTimeout(function () {
//             window.setTimeout(function () {
                 update();
//                 update();
             }, 1000);
//             }, 1000);
         }
//         }
     }
//     }


     function getOptions(node) {
//     function getOptions(node) {
         /*jshint bitwise:false*/
//         /*jshint bitwise:false*/
         var text = node.parent().attr('data-options'),
//         var text = node.parent().attr('data-options'),
             opts = 0;
//             opts = 0;
         if (text) {
//         if (text) {
             if (/no-leading-zeros/.test(text)) {
//             if (/no-leading-zeros/.test(text)) {
                 opts |= NO_LEADING_ZEROS;
//                 opts |= NO_LEADING_ZEROS;
             }
//             }
         }
//         }
         return opts;
//         return opts;
     }
//     }


     $(function () {
//     $(function () {
         var countdown = $('.countdown');
//         var countdown = $('.countdown');
         if (!countdown.length) return;
//         if (!countdown.length) return;
         $('.nocountdown').css('display', 'none');
//         $('.nocountdown').css('display', 'none');
         countdown
//         countdown
             .css('display', 'inline')
//             .css('display', 'inline')
             .find('.countdowndate')
//             .find('.countdowndate')
             .each(function () {
//             .each(function () {
                 var $this = $(this),
//                 var $this = $(this),
                     date = (new Date($this.text())).valueOf();
//                     date = (new Date($this.text())).valueOf();
                 if (isNaN(date)) {
//                 if (isNaN(date)) {
                     $this.text('BAD DATE');
//                     $this.text('BAD DATE');
                     return;
//                     return;
                 }
//                 }
                 countdowns.push({
//                 countdowns.push({
                     node: $this,
//                     node: $this,
                     opts: getOptions($this),
//                     opts: getOptions($this),
                     date: date,
//                     date: date,
                 });
//                 });
             });
//             });
         if (countdowns.length) {
//         if (countdowns.length) {
             update();
//             update();
         }
//         }
     });
//     });


} (window.countdownTimer = window.countdownTimer || {}, mediaWiki, jQuery));
// } (window.countdownTimer = window.countdownTimer || {}, mediaWiki, jQuery));
//</source>
// //</source>


/*  导航  */
// /*  导航  */
$(function () {
// $(function () {
     /*战舰少女R导航*/
//     /*战舰少女R导航*/
     (function ($, de) {
//     (function ($, de) {
         /*导航栏悬浮、点击展开*/
//         /*导航栏悬浮、点击展开*/
         $(".banner1").hover(function () {
//         $(".banner1").hover(function () {
             $(this).find(".banner2").eq(0).show();
//             $(this).find(".banner2").eq(0).show();
         }, function () {
//         }, function () {
             $(this).find(".banner2").eq(0).hide();
//             $(this).find(".banner2").eq(0).hide();
         });
//         });
         var isTouch = ('ontouchstart' in de) ? 'touchstart' : 'click', _on = $.fn.on;
//         var isTouch = ('ontouchstart' in de) ? 'touchstart' : 'click', _on = $.fn.on;
         $.fn.on = function () {
//         $.fn.on = function () {
             arguments[0] = (arguments[0] === 'click') ? isTouch : arguments[0];
//             arguments[0] = (arguments[0] === 'click') ? isTouch : arguments[0];
             return _on.apply(this, arguments);
//             return _on.apply(this, arguments);
         };
//         };
         $(".banner1").on("click", function () {
//         $(".banner1").on("click", function () {
             var obj = $(this).find(".banner2").eq(0);
//             var obj = $(this).find(".banner2").eq(0);
             if (obj.is("visible")) {
//             if (obj.is("visible")) {
                 obj.hide();
//                 obj.hide();
             } else {
//             } else {
                 obj.show();
//                 obj.show();
             }
//             }
             $(this).siblings().find(".banner2").hide();
//             $(this).siblings().find(".banner2").hide();
         });
//         });
         /*导航栏倒计时*/
//         /*导航栏倒计时*/
         var now = new Date();
//         var now = new Date();
         var nows = now.getTime();
//         var nows = now.getTime();
         now.setHours(0);
//         now.setHours(0);
         now.setMinutes(0);
//         now.setMinutes(0);
         now.setSeconds(0);
//         now.setSeconds(0);
         var today = now.getTime();
//         var today = now.getTime();


         var passed = Math.floor((nows - today) / 1000);
//         var passed = Math.floor((nows - today) / 1000);
         changeCountDown();
//         changeCountDown();
         setInterval(function () {
//         setInterval(function () {
             changeCountDown();
//             changeCountDown();
         }, 1000);
//         }, 1000);
         function changeCountDown() {
//         function changeCountDown() {
             var lave = 24 * 60 * 60 - passed, h = Math.floor(lave / 3600), m = Math.floor((lave - h * 3600) / 60), s = lave - h * 3600 - m * 60, _s = '', _c = '#0F3';
//             var lave = 24 * 60 * 60 - passed, h = Math.floor(lave / 3600), m = Math.floor((lave - h * 3600) / 60), s = lave - h * 3600 - m * 60, _s = '', _c = '#0F3';
             if (passed < 60) _s = ",成功+1day";
//             if (passed < 60) _s = ",成功+1day";
             if (passed > 12 * 3600) _c = "#fc0";
//             if (passed > 12 * 3600) _c = "#fc0";
             if (passed > 23 * 3600) _c = "#F30";
//             if (passed > 23 * 3600) _c = "#F30";
             $("#zjsnr-lavetime").html("<span style='color:" + _c + "'>" + h + "</span>" + "小时" + "<span style='color:" + _c + "'>" + m + "</span>" + "分" + "<span style='color:" + _c + "'>" + s + "</span>" + "秒" + _s);
//             $("#zjsnr-lavetime").html("<span style='color:" + _c + "'>" + h + "</span>" + "小时" + "<span style='color:" + _c + "'>" + m + "</span>" + "分" + "<span style='color:" + _c + "'>" + s + "</span>" + "秒" + _s);
             passed++;
//             passed++;
         }
//         }


     } (jQuery, document.documentElement));
//     } (jQuery, document.documentElement));
});
// });


/* 显示上级页面标题的链接 */
// /* 显示上级页面标题的链接 */
$(function () {
// $(function () {
     if (mw.config.values.wgPageName.indexOf('/') != -1 && !$('.subpages')[0] && (mw.config.values.wgNamespaceIds.special != mw.config.values.wgNamespaceNumber || mw.config.values.wgPageName.indexOf('Special:移动页面') != -1)) {
//     if (mw.config.values.wgPageName.indexOf('/') != -1 && !$('.subpages')[0] && (mw.config.values.wgNamespaceIds.special != mw.config.values.wgNamespaceNumber || mw.config.values.wgPageName.indexOf('Special:移动页面') != -1)) {
         var links = mw.config.values.wgPageName.split('/'),
//         var links = mw.config.values.wgPageName.split('/'),
             link = '/wiki',
//             link = '/wiki',
             subpages = $('<span class="subpages"></span>').text('<'),
//             subpages = $('<span class="subpages"></span>').text('<'),
             length = links.length - 1,
//             length = links.length - 1,
             index;
//             index;
         if (mw.config.values.wgPageName.indexOf('Special:移动页面') != -1) links.splice(0, 1);
//         if (mw.config.values.wgPageName.indexOf('Special:移动页面') != -1) links.splice(0, 1);
         for (index = 0; index < length; index++) {
//         for (index = 0; index < length; index++) {
             link += '/' + links[index];
//             link += '/' + links[index];
             subpages.append($('<a/>', {
//             subpages.append($('<a/>', {
                 text: ' ' + links[index],
//                 text: ' ' + links[index],
                 href: link
//                 href: link
             }));
//             }));
             if (length - index - 1) subpages.append(" |");
//             if (length - index - 1) subpages.append(" |");
         }
//         }
         $('#contentSub').prepend(subpages);
//         $('#contentSub').prepend(subpages);
     }
//     }
});
// });
/* sitenotice */
// /* sitenotice */
$(function () {
// $(function () {
     var self = $('#siteNoticeScroll');
//     var self = $('#siteNoticeScroll');
     if (!self[0]) return;
//     if (!self[0]) return;
     var ul = self.find('ul:first');
//     var ul = self.find('ul:first');
     ul.width(self.width() * self.find('li').length).attr({
//     ul.width(self.width() * self.find('li').length).attr({
         'data-left': 0,
//         'data-left': 0,
         'data-length': self.find('li').length
//         'data-length': self.find('li').length
     }).find('li').width(self.width());
//     }).find('li').width(self.width());
     window.setInterval(function () {
//     window.setInterval(function () {
         var dataset = ul[0].dataset,
//         var dataset = ul[0].dataset,
             oldLeft = +dataset.left;
//             oldLeft = +dataset.left;
         ul.css('marginLeft', -(++oldLeft * self.width()) + 'px').delay(730).queue(function () {
//         ul.css('marginLeft', -(++oldLeft * self.width()) + 'px').delay(730).queue(function () {
             dataset.left = oldLeft === +dataset.length - 1 ? -1 : oldLeft;
//             dataset.left = oldLeft === +dataset.length - 1 ? -1 : oldLeft;
             $(this).dequeue();
//             $(this).dequeue();
         });
//         });
     }, 5000);
//     }, 5000);
     $(window).on('resize', function () {
//     $(window).on('resize', function () {
         ul.width(self.width() * self.find('li').length).animate({
//         ul.width(self.width() * self.find('li').length).animate({
             marginLeft: -((+ul[0].dataset.left === -1 ? 0 : +ul[0].dataset.left) * self.width()) + 'px'
//             marginLeft: -((+ul[0].dataset.left === -1 ? 0 : +ul[0].dataset.left) * self.width()) + 'px'
         }, 370);
//         }, 370);
     });
//     });
});
// });


/* Google Analytics */
// /* Google Analytics */
/*  
// /*  
   (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
//   (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
   (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
//   (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
   m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
//   m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
   })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
//   })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');


   ga('create', 'UA-79438840-1', 'auto');
//   ga('create', 'UA-79438840-1', 'auto');
   ga('send', 'pageview');
//   ga('send', 'pageview');
  */
// */


/* 百度推送 */
// /* 百度推送 */
/*
// /*
(function(){
// (function(){
     var bp = document.createElement('script');
//     var bp = document.createElement('script');
     var curProtocol = window.location.protocol.split(':')[0];
//     var curProtocol = window.location.protocol.split(':')[0];
         if (curProtocol === 'https') {
//         if (curProtocol === 'https') {
             bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';         
//             bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';         
         }
//         }
         else {
//         else {
             bp.src = 'http://push.zhanzhang.baidu.com/push.js';
//             bp.src = 'http://push.zhanzhang.baidu.com/push.js';
         }
//         }
         var s = document.getElementsByTagName("script")[0];
//         var s = document.getElementsByTagName("script")[0];
         s.parentNode.insertBefore(bp, s);
//         s.parentNode.insertBefore(bp, s);
})();
// })();
*/
// */


/*百度推送改*/
// /*百度推送改*/
/*
// /*
(function(){
// (function(){
var canonicalURL, curProtocol;
// var canonicalURL, curProtocol;
//Get the <link> tag
// //Get the <link> tag
var x=document.getElementsByTagName("link");
// var x=document.getElementsByTagName("link");
//Find the last canonical URL
// //Find the last canonical URL
if(x.length > 0){
// if(x.length > 0){
     for (var i=0;i<x.length;i++){
//     for (var i=0;i<x.length;i++){
         if(x[i].rel.toLowerCase() == 'canonical' && x[i].href){
//         if(x[i].rel.toLowerCase() == 'canonical' && x[i].href){
             canonicalURL=x[i].href;
//             canonicalURL=x[i].href;
         }
//         }
     }
//     }
}
// }
//Get protocol
// //Get protocol
if (!canonicalURL){
// if (!canonicalURL){
     curProtocol = window.location.protocol.split(':')[0];
//     curProtocol = window.location.protocol.split(':')[0];
}
// }
else{
// else{
     curProtocol = canonicalURL.split(':')[0];
//     curProtocol = canonicalURL.split(':')[0];
}
// }
//Get current URL if the canonical URL does not exist
// //Get current URL if the canonical URL does not exist
if (!canonicalURL) canonicalURL = window.location.href;
// if (!canonicalURL) canonicalURL = window.location.href;
//Assign script content. Replace current URL with the canonical URL
// //Assign script content. Replace current URL with the canonical URL
!function(){var e=/([http|https]:\/\/[a-zA-Z0-9\_\.]+\.baidu\.com)/gi,r=canonicalURL,t=document.referrer;if(!e.test(r)){var n=(String(curProtocol).toLowerCase() === 'https')?"https://sp0.baidu.com/9_Q4simg2RQJ8t7jm9iCKT-xh_/s.gif":"//api.share.baidu.com/s.gif";t?(n+="?r="+encodeURIComponent(document.referrer),r&&(n+="&l="+r)):r&&(n+="?l="+r);var i=new Image;i.src=n}}(window);})();
// !function(){var e=/([http|https]:\/\/[a-zA-Z0-9\_\.]+\.baidu\.com)/gi,r=canonicalURL,t=document.referrer;if(!e.test(r)){var n=(String(curProtocol).toLowerCase() === 'https')?"https://sp0.baidu.com/9_Q4simg2RQJ8t7jm9iCKT-xh_/s.gif":"//api.share.baidu.com/s.gif";t?(n+="?r="+encodeURIComponent(document.referrer),r&&(n+="&l="+r)):r&&(n+="?l="+r);var i=new Image;i.src=n}}(window);})();
*/
// */


/*齐柏林页面专用*/
// /*齐柏林页面专用*/
function MM_effectGrowShrink(targetElement, duration, from, to, toggle, referHeight, growFromCenter)
// function MM_effectGrowShrink(targetElement, duration, from, to, toggle, referHeight, growFromCenter)
{
// {
Spry.Effect.DoGrow(targetElement, {duration: duration, from: from, to: to, toggle: toggle, referHeight: referHeight, growCenter: growFromCenter});
// Spry.Effect.DoGrow(targetElement, {duration: duration, from: from, to: to, toggle: toggle, referHeight: referHeight, growCenter: growFromCenter});
}
// }


/* jQuery.pin.js */
// /* jQuery.pin.js */
(function ($) {
// (function ($) {
     "use strict";
//     "use strict";
     $.fn.pin = function (options) {
//     $.fn.pin = function (options) {
         var scrollY = 0, elements = [], disabled = false, $window = $(window);
//         var scrollY = 0, elements = [], disabled = false, $window = $(window);


         options = options || {};
//         options = options || {};


         var recalculateLimits = function () {
//         var recalculateLimits = function () {
             for (var i=0, len=elements.length; i<len; i++) {
//             for (var i=0, len=elements.length; i<len; i++) {
                 var $this = elements[i];
//                 var $this = elements[i];


                 if (options.minWidth && $window.width() <= options.minWidth) {
//                 if (options.minWidth && $window.width() <= options.minWidth) {
                     if ($this.parent().is(".pin-wrapper")) { $this.unwrap(); }
//                     if ($this.parent().is(".pin-wrapper")) { $this.unwrap(); }
                     $this.css({width: "", left: "", top: "", position: ""});
//                     $this.css({width: "", left: "", top: "", position: ""});
                     if (options.activeClass) { $this.removeClass(options.activeClass); }
//                     if (options.activeClass) { $this.removeClass(options.activeClass); }
                     disabled = true;
//                     disabled = true;
                     continue;
//                     continue;
                 } else {
//                 } else {
                     disabled = false;
//                     disabled = false;
                 }
//                 }


                 var $container = options.containerSelector ? $this.closest(options.containerSelector) : $(document.body);
//                 var $container = options.containerSelector ? $this.closest(options.containerSelector) : $(document.body);
                 var offset = $this.offset();
//                 var offset = $this.offset();
                 var containerOffset = $container.offset();
//                 var containerOffset = $container.offset();
                 var parentOffset = $this.offsetParent().offset();
//                 var parentOffset = $this.offsetParent().offset();


                 if (!$this.parent().is(".pin-wrapper")) {
//                 if (!$this.parent().is(".pin-wrapper")) {
                     $this.wrap("<div class='pin-wrapper'>");
//                     $this.wrap("<div class='pin-wrapper'>");
                 }
//                 }


                 var pad = $.extend({
//                 var pad = $.extend({
                   top: 0,
//                   top: 0,
                   bottom: 0
//                   bottom: 0
                 }, options.padding || {});
//                 }, options.padding || {});


                 $this.data("pin", {
//                 $this.data("pin", {
                     pad: pad,
//                     pad: pad,
                     from: (options.containerSelector ? containerOffset.top : offset.top) - pad.top,
//                     from: (options.containerSelector ? containerOffset.top : offset.top) - pad.top,
                     to: containerOffset.top + $container.height() - $this.outerHeight() - pad.bottom,
//                     to: containerOffset.top + $container.height() - $this.outerHeight() - pad.bottom,
                     end: containerOffset.top + $container.height(),
//                     end: containerOffset.top + $container.height(),
                     parentTop: parentOffset.top
//                     parentTop: parentOffset.top
                 });
//                 });


                 $this.css({width: $this.outerWidth()});
//                 $this.css({width: $this.outerWidth()});
                 $this.parent().css("height", $this.outerHeight());
//                 $this.parent().css("height", $this.outerHeight());
             }
//             }
         };
//         };


         var onScroll = function () {
//         var onScroll = function () {
             if (disabled) { return; }
//             if (disabled) { return; }


             scrollY = $window.scrollTop();
//             scrollY = $window.scrollTop();


             var elmts = [];
//             var elmts = [];
             for (var i=0, len=elements.length; i<len; i++) {           
//             for (var i=0, len=elements.length; i<len; i++) {           
                 var $this = $(elements[i]),
//                 var $this = $(elements[i]),
                     data  = $this.data("pin");
//                     data  = $this.data("pin");


                 if (!data) { // Removed element
//                 if (!data) { // Removed element
                   continue;
//                   continue;
                 }
//                 }


                 elmts.push($this);  
//                 elmts.push($this);  
                    
                    
                 var from = data.from - data.pad.bottom,
//                 var from = data.from - data.pad.bottom,
                     to = data.to - data.pad.top;
//                     to = data.to - data.pad.top;
                
                
                 if (from + $this.outerHeight() > data.end) {
//                 if (from + $this.outerHeight() > data.end) {
                     $this.css('position', '');
//                     $this.css('position', '');
                     continue;
//                     continue;
                 }
//                 }
                
                
                 if (from < scrollY && to > scrollY) {
//                 if (from < scrollY && to > scrollY) {
                     !($this.css("position") == "fixed") && $this.css({
//                     !($this.css("position") == "fixed") && $this.css({
                         left: $this.offset().left,
//                         left: $this.offset().left,
                         top: data.pad.top
//                         top: data.pad.top
                     }).css("position", "fixed");
//                     }).css("position", "fixed");
                     if (options.activeClass) { $this.addClass(options.activeClass); }
//                     if (options.activeClass) { $this.addClass(options.activeClass); }
                 } else if (scrollY >= to) {
//                 } else if (scrollY >= to) {
                     $this.css({
//                     $this.css({
                         left: "",
//                         left: "",
                         top: to - data.parentTop + data.pad.top
//                         top: to - data.parentTop + data.pad.top
                     }).css("position", "absolute");
//                     }).css("position", "absolute");
                     if (options.activeClass) { $this.addClass(options.activeClass); }
//                     if (options.activeClass) { $this.addClass(options.activeClass); }
                 } else {
//                 } else {
                     $this.css({position: "", top: "", left: ""});
//                     $this.css({position: "", top: "", left: ""});
                     if (options.activeClass) { $this.removeClass(options.activeClass); }
//                     if (options.activeClass) { $this.removeClass(options.activeClass); }
                 }
//                 }
           }
//           }
           elements = elmts;
//           elements = elmts;
         };
//         };


         var update = function () { recalculateLimits(); onScroll(); };
//         var update = function () { recalculateLimits(); onScroll(); };


         this.each(function () {
//         this.each(function () {
             var $this = $(this),  
//             var $this = $(this),  
                 data  = $(this).data('pin') || {};
//                 data  = $(this).data('pin') || {};


             if (data && data.update) { return; }
//             if (data && data.update) { return; }
             elements.push($this);
//             elements.push($this);
             $("img", this).one("load", recalculateLimits);
//             $("img", this).one("load", recalculateLimits);
             data.update = update;
//             data.update = update;
             $(this).data('pin', data);
//             $(this).data('pin', data);
         });
//         });


         $window.scroll(onScroll);
//         $window.scroll(onScroll);
         $window.resize(function () { recalculateLimits(); });
//         $window.resize(function () { recalculateLimits(); });
         recalculateLimits();
//         recalculateLimits();


         $window.load(update);
//         $window.load(update);


         return this;
//         return this;
       };
//       };
})(jQuery);
// })(jQuery);
/* END jQuery.pin.js */
// /* END jQuery.pin.js */
/* Adpex个人页面专专用 */
// /* Adpex个人页面专专用 */
$(".pinned").pin();
// $(".pinned").pin();


/* 打咪咪比赛专用  */
// /* 打咪咪比赛专用  */
$(document).ready(function(){
// $(document).ready(function(){
$("#random_watch").click(function(){
// $("#random_watch").click(function(){
url = new Array();
// url = new Array();
url[0]="http://live.bilibili.com/109179"
// url[0]="http://live.bilibili.com/109179"
url[1]="https://www.douyu.com/336980"
// url[1]="https://www.douyu.com/336980"
url[2]="http://live.bilibili.com/183124"
// url[2]="http://live.bilibili.com/183124"
url[4]="http://live.bilibili.com/93923 "
// url[4]="http://live.bilibili.com/93923 "
url[5]="https://www.douyu.com/441839"
// url[5]="https://www.douyu.com/441839"
url[6]="https://www.douyu.com/1568"
// url[6]="https://www.douyu.com/1568"
url[7]="http://live.bilibili.com/live/2014642.html"
// url[7]="http://live.bilibili.com/live/2014642.html"
url[8]="http://www.douyu.com/852163"
// url[8]="http://www.douyu.com/852163"
url[9]="https://www.douyu.com/1502914"
// url[9]="https://www.douyu.com/1502914"
url[10]="http://live.bilibili.com/1318658"
// url[10]="http://live.bilibili.com/1318658"
url[11]="http://live.bilibili.com/90341"
// url[11]="http://live.bilibili.com/90341"
url[12]="http://live.bilibili.com/90240"
// url[12]="http://live.bilibili.com/90240"
url[13]="http://live.bilibili.com/143646"
// url[13]="http://live.bilibili.com/143646"
url[14]="http://live.bilibili.com/24502"
// url[14]="http://live.bilibili.com/24502"
url[15]="https://www.douyu.com/1183161"
// url[15]="https://www.douyu.com/1183161"
url[16]="http://www.douyu.com/foolmagi"
// url[16]="http://www.douyu.com/foolmagi"
url[17]="https://www.douyu.com/966457"
// url[17]="https://www.douyu.com/966457"
url[18]="http://live.bilibili.com/57006"
// url[18]="http://live.bilibili.com/57006"
url[19]="http://live.bilibili.com/27948"
// url[19]="http://live.bilibili.com/27948"
url[20]="http://live.bilibili.com/534587"
// url[20]="http://live.bilibili.com/534587"
url[21]="https://www.douyu.com/1228108?1481424287282"
// url[21]="https://www.douyu.com/1228108?1481424287282"
url[22]="http://live.bilibili.com/18995"
// url[22]="http://live.bilibili.com/18995"
url[23]="http://live.bilibili.com/56207"
// url[23]="http://live.bilibili.com/56207"
url[24]="http://live.bilibili.com/1076902"
// url[24]="http://live.bilibili.com/1076902"
url[25]="http://live.bilibili.com/1080775"
// url[25]="http://live.bilibili.com/1080775"
url[26]="http://live.bilibili.com/56076"
// url[26]="http://live.bilibili.com/56076"
url[27]="http://live.bilibili.com/33409"
// url[27]="http://live.bilibili.com/33409"
url[28]="http://live.bilibili.com/76119"
// url[28]="http://live.bilibili.com/76119"
url[29]="http://live.bilibili.com/2527639"
// url[29]="http://live.bilibili.com/2527639"
url[30]="http://live.bilibili.com/52883"
// url[30]="http://live.bilibili.com/52883"
url[31]="http://live.bilibili.com/17682"
// url[31]="http://live.bilibili.com/17682"
url[32]="http://live.bilibili.com/348416"
// url[32]="http://live.bilibili.com/348416"
url[33]="http://live.bilibili.com/163932"
// url[33]="http://live.bilibili.com/163932"
url[34]="http://live.bilibili.com/54638"
// url[34]="http://live.bilibili.com/54638"
url[35]="http://live.bilibili.com/2377121"
// url[35]="http://live.bilibili.com/2377121"
url[36]="http://live.bilibili.com/1143121"
// url[36]="http://live.bilibili.com/1143121"
url[37]="http://live.bilibili.com/2657692"
// url[37]="http://live.bilibili.com/2657692"
url[38]="https://www.douyu.com/1402424"
// url[38]="https://www.douyu.com/1402424"
url[39]="http://live.bilibili.com/438471"
// url[39]="http://live.bilibili.com/438471"
url[40]="https://www.douyu.com/1490091"
// url[40]="https://www.douyu.com/1490091"
url[41]="http://live.bilibili.com/37405"
// url[41]="http://live.bilibili.com/37405"
url[42]="http://live.bilibili.com/71846"
// url[42]="http://live.bilibili.com/71846"
url[43]="https://www.douyu.com/1490657"
// url[43]="https://www.douyu.com/1490657"
url[44]="http://live.bilibili.com/25583"
// url[44]="http://live.bilibili.com/25583"
url[45]="http://live.bilibili.com/54148"
// url[45]="http://live.bilibili.com/54148"
url[46]="http://live.bilibili.com/1633189"
// url[46]="http://live.bilibili.com/1633189"
url[47]="http://live.bilibili.com/49301"
// url[47]="http://live.bilibili.com/49301"
url[48]="https://www.douyu.com/925609"
// url[48]="https://www.douyu.com/925609"
url[49]="http://live.bilibili.com/10970"
// url[49]="http://live.bilibili.com/10970"
url[50]="http://live.bilibili.com/47479"
// url[50]="http://live.bilibili.com/47479"
url[51]="http://live.bilibili.com/844795"
// url[51]="http://live.bilibili.com/844795"
url[52]="http://live.bilibili.com/938814"
// url[52]="http://live.bilibili.com/938814"
url[53]="http://live.bilibili.com/49301"
// url[53]="http://live.bilibili.com/49301"
url[54]="http://live.bilibili.com/951267"
// url[54]="http://live.bilibili.com/951267"
url[55]="http://live.bilibili.com/2639103"
// url[55]="http://live.bilibili.com/2639103"
url[56]="http://live.bilibili.com/live/2646929.html"
// url[56]="http://live.bilibili.com/live/2646929.html"
url[57]="http://live.bilibili.com/145640"
// url[57]="http://live.bilibili.com/145640"
url[58]="http://www.douyu.com/wenrenfangge"
// url[58]="http://www.douyu.com/wenrenfangge"
url[59]="http://live.bilibili.com/92703"
// url[59]="http://live.bilibili.com/92703"
url[60]="http://live.bilibili.com/15224"
// url[60]="http://live.bilibili.com/15224"
url[61]="http://live.bilibili.com/854280"
// url[61]="http://live.bilibili.com/854280"
url[62]="https://www.douyu.com/594715"
// url[62]="https://www.douyu.com/594715"
url[63]="https://www.zhanqi.tv/152576257"
// url[63]="https://www.zhanqi.tv/152576257"
url[64]="https://www.douyu.com/673916"
// url[64]="https://www.douyu.com/673916"
url[65]="https://www.douyu.com/314463"
// url[65]="https://www.douyu.com/314463"
url[66]="http://live.bilibili.com/2635681"
// url[66]="http://live.bilibili.com/2635681"
url[67]="https://www.douyu.com/304097"
// url[67]="https://www.douyu.com/304097"
url[68]="http://live.bilibili.com/864181"
// url[68]="http://live.bilibili.com/864181"
url[69]="live.bilibili.com/2296076"
// url[69]="live.bilibili.com/2296076"
url[70]="http://live.bilibili.com/309855"
// url[70]="http://live.bilibili.com/309855"
url[71]="http://live.bilibili.com/1608950"
// url[71]="http://live.bilibili.com/1608950"
url[72]="http://live.bilibili.com/417898"
// url[72]="http://live.bilibili.com/417898"
url[73]="http://live.bilibili.com/55746"
// url[73]="http://live.bilibili.com/55746"
url[74]="http://www.douyu.com/jianniang"
// url[74]="http://www.douyu.com/jianniang"
url[75]="http://live.bilibili.com/2597497"
// url[75]="http://live.bilibili.com/2597497"
url[76]="http://live.bilibili.com/1736138"
// url[76]="http://live.bilibili.com/1736138"
url[77]="http://live.bilibili.com/269717"
// url[77]="http://live.bilibili.com/269717"
url[78]="http://live.bilibili.com/158960"
// url[78]="http://live.bilibili.com/158960"
url[79]="https://www.douyu.com/438554"
// url[79]="https://www.douyu.com/438554"
url[80]="http://live.bilibili.com/1171461"
// url[80]="http://live.bilibili.com/1171461"
url[81]="http://live.bilibili.com/521816"
// url[81]="http://live.bilibili.com/521816"
url[82]="http://live.bilibili.com/129308"
// url[82]="http://live.bilibili.com/129308"
url[83]="http://live.bilibili.com/181994"
// url[83]="http://live.bilibili.com/181994"
url[84]="http://live.bilibili.com/2664976"
// url[84]="http://live.bilibili.com/2664976"
url[85]="http://live.bilibili.com/402181"
// url[85]="http://live.bilibili.com/402181"
url[86]="https://www.douyu.com/1488286"
// url[86]="https://www.douyu.com/1488286"
url[87]="http://live.bilibili.com/44240"
// url[87]="http://live.bilibili.com/44240"
url[88]="http://live.bilibili.com/2383203"
// url[88]="http://live.bilibili.com/2383203"
url[89]="http://live.bilibili.com/430709"
// url[89]="http://live.bilibili.com/430709"
url[90]="http://live.bilibili.com/24241"
// url[90]="http://live.bilibili.com/24241"
url[91]="http://live.bilibili.com/279432"
// url[91]="http://live.bilibili.com/279432"
url[92]="https://www.douyu.com/1946566"
// url[92]="https://www.douyu.com/1946566"
                         url[93]="http://www.douyu.com/606387"
//                         url[93]="http://www.douyu.com/606387"
url[94]="http://live.bilibili.com/91444"
// url[94]="http://live.bilibili.com/91444"
                         url[95]="http://live.bilibili.com/400829"
//                         url[95]="http://live.bilibili.com/400829"
                         url[96]="https://www.douyu.tv/1494382"
//                         url[96]="https://www.douyu.tv/1494382"
                         url[97]="http://live.bilibili.com/2714958"
//                         url[97]="http://live.bilibili.com/2714958"
                         url[98]="http://live.bilibili.com/2133201"
//                         url[98]="http://live.bilibili.com/2133201"
                         url[99]="https://www.douyu.com/1948994"
//                         url[99]="https://www.douyu.com/1948994"
                         url[100]="http://live.bilibili.com/341627"
//                         url[100]="http://live.bilibili.com/341627"
                         url[101]="https://www.douyu.com/1693122"
//                         url[101]="https://www.douyu.com/1693122"
                         url[102]="http://live.bilibili.com/230448"
//                         url[102]="http://live.bilibili.com/230448"
                         url[103]="http://live.bilibili.com/3592696"
//                         url[103]="http://live.bilibili.com/3592696"
                         url[104]="http://live.bilibili.com/1374757"
//                         url[104]="http://live.bilibili.com/1374757"
                         url[105]="http://live.bilibili.com/4302561"
//                         url[105]="http://live.bilibili.com/4302561"
                         url[106]="http://live.bilibili.com/156015"
//                         url[106]="http://live.bilibili.com/156015"
                         url[107]="https://www.douyu.com/2140816"
//                         url[107]="https://www.douyu.com/2140816"
                         url[108]="http://live.bilibili.com/333001"
//                         url[108]="http://live.bilibili.com/333001"
                         url[109]="https://www.douyu.com/907992"
//                         url[109]="https://www.douyu.com/907992"
                         url[110]="http://live.bilibili.com/2620904"
//                         url[110]="http://live.bilibili.com/2620904"
                         url[111]="http://live.bilibili.com/4303516"
//                         url[111]="http://live.bilibili.com/4303516"
                         url[112]="http://live.bilibili.com/1029481"
//                         url[112]="http://live.bilibili.com/1029481"
                         url[113]="http://live.bilibili.com/840729"
//                         url[113]="http://live.bilibili.com/840729"
                         url[114]="http://live.bilibili.com/986237"
//                         url[114]="http://live.bilibili.com/986237"
                         url[115]="https://www.douyu.com/2088295"
//                         url[115]="https://www.douyu.com/2088295"
                         url[116]="http://live.bilibili.com/74198"
//                         url[116]="http://live.bilibili.com/74198"
                         url[117]="http://live.bilibili.com/24769"
//                         url[117]="http://live.bilibili.com/24769"
                         url[118]="http://live.bilibili.com/92515"
//                         url[118]="http://live.bilibili.com/92515"
                         url[119]="http://live.bilibili.com/678456"
//                         url[119]="http://live.bilibili.com/678456"
                         url[120]="https://www.douyu.com/1638818"
//                         url[120]="https://www.douyu.com/1638818"
                         url[121]="https://www.douyu.com/2102138"
//                         url[121]="https://www.douyu.com/2102138"
                         url[122]="https://www.douyu.com/210483"
//                         url[122]="https://www.douyu.com/210483"
                         url[123]="https://www.douyu.com/1501502"
//                         url[123]="https://www.douyu.com/1501502"
                         url[124]="http://live.bilibili.com/50184"
//                         url[124]="http://live.bilibili.com/50184"
                         url[125]="http://live.bilibili.com/23926"
//                         url[125]="http://live.bilibili.com/23926"


i = Math.random() * url.length;
// i = Math.random() * url.length;
   i = Math.floor(i);
//   i = Math.floor(i);
   //alert(url[i]);
//   //alert(url[i]);
   window.open(url[i]);   
//   window.open(url[i]);   
});
// });
});
// });
/* 打咪咪end */
// /* 打咪咪end */

2024年1月10日 (三) 10:19的最新版本

// /* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */


// /* 显示存在的配音文件的播放按钮 */
// $(document).ready(function () {
//     var players = document.getElementsByClassName('flat');
//     for (var i = 0; i < players.length; i++) {
//         url = players[i].lastChild.href;
//         $.ajax({
//             url: url,
//             context: players[i],
//             type: 'HEAD',
//             success: function () {
//                 this.style.cssText = "display: inline;";
//             }
//         });        
//     }
// });

// /* 随机选择背景 */
// // var bg_links = ['url(https://i.loli.net/2020/01/19/31GwqBplCKDaMHW.jpg)', 'url(https://i.loli.net/2020/01/19/PpvFBOdT8DArt47.jpg)', "url(https://i.loli.net/2020/09/27/h86Nc4AIsmLb1Vi.jpg)", "url(https://i.loli.net/2021/09/23/LIqwG9c5xDQCY4Z.jpg)", "url(https://s2.loli.net/2022/11/06/XSB5YxF3ao2f7ZT.jpg)"];
// function weightedRandomSelection(items) {
//   // Calculate the total weight of all items.
//   var totalWeight = 0;
//   for (var i = 0; i < items.length; i++) {
//     totalWeight += items[i][1];
//   }

//   // Generate a random value between 0 and the total weight.
//   var randomValue = Math.random() * totalWeight;

//   // Iterate over the items, keeping track of the current weight.
//   var currentWeight = 0;
//   for (i = 0; i < items.length; i++) {
//     currentWeight += items[i][1];

//     // If the current weight is greater than or equal to the random value, return the item.
//     if (currentWeight >= randomValue) {
//       return items[i][0];
//     }
//   }

//   // If we reach here, it means that the random value was greater than the total weight, which should never happen.
//   console.log(currentWeight, randomValue);
//   throw new Error("Random value was greater than total weight.");
// }

// var bg_links = [
// ['url(https://0v0.zjsnrwiki.com/static/bg_L.webp)', 0.005],
//   ['url(https://0v0.zjsnrwiki.com/static/bg_4.webp)', 0.2],
//   ['url(https://0v0.zjsnrwiki.com/static/bg_5.webp)', 0.2],
//   ['url(https://0v0.zjsnrwiki.com/static/bg_6.webp)', 0.2],
//   ['url(https://0v0.zjsnrwiki.com/static/bg_7.webp)', 0.2],
//   ['url(https://0v0.zjsnrwiki.com/static/bg_8a.webp)', 0.2], ['url(https://0v0.zjsnrwiki.com/static/bg_8b.webp)', 0.005],
//   ['url(https://0v0.zjsnrwiki.com/static/bg_9a.webp)', 0.2], ['url(https://0v0.zjsnrwiki.com/static/bg_9b.webp)', 0.005],
// ];
// var random_bg_link = weightedRandomSelection(bg_links);
// console.log(random_bg_link);
// $('body.skin-vector').css('background',random_bg_link);
// $('body.skin-vector').css('background-position', 'centre');
// $('body.skin-vector').css('background-repeat', 'no-repeat');
// $('body.skin-vector').css('background-size', 'cover');
// $('body.skin-vector').css('background-attachment', 'fixed');

// $('body.skin-citizen').css('background', random_bg_link);
// $('body.skin-citizen').css('background-position', 'centre');
// $('body.skin-citizen').css('background-repeat', 'no-repeat');
// $('body.skin-citizen').css('background-size', 'cover');
// $('body.skin-citizen').css('background-attachment', 'fixed');


// /* 切换立绘按钮(当前作废) */
// $(document).ready(function () {
//     $("#btn_2").click(function () {
//         $("#btn_1, #btn_2").hide();
//         $("#btn_3, #btn_4").show();
//     });
//     $("#btn_3").click(function () {
//         $("#btn_1, #btn_3").hide();
//         $("#btn_2, #btn_4").show();
//     });
//     $("#btn_4").click(function () {
//         $("#btn_1, #btn_4").hide();
//         $("#btn_2, #btn_3").show();
//     });
//     $("#btn_5").click(function () {
//         $("#btn_1, #btn_2, #btn_3, #btn_4").show();
//     });
// });

// /* Countdown */
// // __NOWYSIWYG__ <source lang="javascript">
// /**
// * Countdown
// *
// * @version 2.1
// *
// * @author Pecoes <http://c.wikia.com/wiki/User:Pecoes>
// * @author Asaba <http://dev.wikia.com/wiki/User:Asaba>
// *
// * Version 1 authors:
// * - Splarka <http://c.wikia.com/wiki/User:Splarka>
// * - Eladkse <http://c.wikia.com/wiki/User:Eladkse>
// *
// * documentation and examples at:
// * <http://dev.wikia.com/wiki/Countdown>
// */

// /*jshint jquery:true, browser:true, devel:true, camelcase:true, curly:false, undef:true, bitwise:true, eqeqeq:true, forin:true, immed:true, latedef:true, newcap:true, noarg:true, unused:true, regexp:true, strict:true, trailing:false */
// /*global mediaWiki:true*/

// (function (module, mw, $, undefined) {

//     'use strict';

//     var translations = {};
//     $.extend(translations, {
//         // Catalan (Català)
//         ca: {
//             and: 'i',
//             second: 'segon',
//             seconds: 'segons',
//             minute: 'minut',
//             minutes: 'minuts',
//             hour: 'hora',
//             hours: 'hores',
//             day: 'dia',
//             days: 'dies'
//         },
//         // German (Deutsch)
//         de: {
//             and: 'und',
//             second: 'Sekunde',
//             seconds: 'Sekunden',
//             minute: 'Minute',
//             minutes: 'Minuten',
//             hour: 'Stunde',
//             hours: 'Stunden',
//             day: 'Tag',
//             days: 'Tage'
//         },
//         // English (English)
//         en: {
//             and: 'and',
//             second: 'second',
//             seconds: 'seconds',
//             minute: 'minute',
//             minutes: 'minutes',
//             hour: 'hour',
//             hours: 'hours',
//             day: 'day',
//             days: 'days'
//         },
//         // Greek (Ελληνικά)
//         el: {
//             and: 'και',
//             second: 'δευτερόλεπτο',
//             seconds: 'δεπτερόλεπτα',
//             minute: 'λετπό',
//             minutes: 'λεπτά',
//             hour: '΄΄ωρα',
//             hours: 'ώρες',
//             day: 'ημέρα',
//             days: 'ημέρες'
//         },
//         // Spanish (Español)
//         es: {
//             and: 'y',
//             second: 'segundo',
//             seconds: 'segundos',
//             minute: 'minuto',
//             minutes: 'minutos',
//             hour: 'hora',
//             hours: 'horas',
//             day: 'día',
//             days: 'días'
//         },
//         // French (Français)
//         fr: {
//             and: 'et',
//             second: 'seconde',
//             seconds: 'secondes',
//             minute: 'minute',
//             minutes: 'minutes',
//             hour: 'heure',
//             hours: 'heures',
//             day: 'jour',
//             days: 'jours'
//         },
//         // Hungarian (Magyar)
//         hu: {
//             and: 'és',
//             second: 'másodperc',
//             seconds: 'másodperc',
//             minute: 'perc',
//             minutes: 'perc',
//             hour: 'óra',
//             hours: 'óra',
//             day: 'nap',
//             days: 'nap'
//         },
//         // Italian (Italiano)
//         it: {
//             and: 'e',
//             second: 'secondo',
//             seconds: 'secondi',
//             minute: 'minuto',
//             minutes: 'minuti',
//             hour: 'ora',
//             hours: 'ore',
//             day: 'giorno',
//             days: 'giorni'
//         },
//         // Japanese (日本語)
//         ja: {
//             and: '',
//             second: '秒',
//             seconds: '秒',
//             minute: '分',
//             minutes: '分',
//             hour: '時間',
//             hours: '時間',
//             day: '日',
//             days: '日'
//         },
//         // Malay (Bahasa Melayu)
//         ms: {
//             and: 'dan',
//             second: 'saat',
//             seconds: 'saat',
//             minute: 'minit',
//             minutes: 'minit',
//             hour: 'jam',
//             hours: 'jam',
//             day: 'hari',
//             days: 'hari'
//         },
//         // Dutch (Nederlands)
//         nl: {
//             and: 'en',
//             second: 'seconde',
//             seconds: 'seconden',
//             minute: 'minuut',
//             minutes: 'minuten',
//             hour: 'uur',
//             hours: 'uur',
//             day: 'dag',
//             days: 'dagen'
//         },
//         // Polish (Polski)
//         pl: {
//             and: 'i',
//             second: 'sekunda',
//             seconds: 'sekund(y)',
//             minute: 'minuta',
//             minutes: 'minut(y)',
//             hour: 'godzina',
//             hours: 'godzin(y)',
//             day: 'dzień',
//             days: 'dni'
//         },
//         // Portuguese (Português)
//         pt: {
//             and: 'e',
//             second: 'segundo',
//             seconds: 'segundos',
//             minute: 'minuto',
//             minutes: 'minutos',
//             hour: 'hora',
//             hours: 'horas',
//             day: 'dia',
//             days: 'dias'

//         },
//         // Brazilian Portuguese (Português do Brasil)
//         'pt-br': {
//             and: 'e',
//             second: 'segundo',
//             seconds: 'segundos',
//             minute: 'minuto',
//             minutes: 'minutos',
//             hour: 'hora',
//             hours: 'horas',
//             day: 'dia',
//             days: 'dias'

//         },
//         // Russian (русский)
//         ru: {
//             and: 'и',
//             second: 'секунда',
//             seconds: 'секунд',
//             minute: 'минута',
//             minutes: 'минут',
//             hour: 'час',
//             hours: 'часов',
//             day: 'день',
//             days: 'дней'
//         },
//         // Serbian (српски језик)
//         sr: {
//             and: 'i',
//             second: 'sekundu',
//             seconds: 'sekunde/-i',
//             minute: 'minutu',
//             minutes: 'minute/-a',
//             hour: 'sat',
//             hours: 'sata/-i',
//             day: 'dan',
//             days: 'dana'
//         },
//         // Vietnamese (Tiếng Việt)
//         vi: {
//             and: 'và',
//             second: 'giây',
//             seconds: 'giây',
//             minute: 'phút',
//             minutes: 'phút',
//             hour: 'giờ',
//             hours: 'giờ',
//             day: 'ngày',
//             days: 'ngày'
//         },
//         // Chinese (中文)
//         zh: {
//             and: ' ',
//             second: '秒',
//             seconds: '秒',
//             minute: '分',
//             minutes: '分',
//             hour: '小时',
//             hours: '小时',
//             day: '天',
//             days: '天'
//         }
//     }, module.translations || {});
//     var countdowns = [],
//         i18n = translations[
//             mw.config.get('wgContentLanguage')
//         ] || translations.zh,
//         NO_LEADING_ZEROS = 1;

//     function output(i, diff) {
//         /*jshint bitwise:false*/
//         var delta, result, parts = [];
//         delta = diff % 60;
//         parts.unshift(delta + ' ' + i18n[delta === 1 ? 'second' : 'seconds']);
//         diff = Math.floor(diff / 60);
//         delta = diff % 60;
//         parts.unshift(delta + ' ' + i18n[delta === 1 ? 'minute' : 'minutes']);
//         diff = Math.floor(diff / 60);
//         delta = diff % 24;
//         parts.unshift(delta + ' ' + i18n[delta === 1 ? 'hour' : 'hours']);
//         diff = Math.floor(diff / 24);
//         parts.unshift(diff + ' ' + i18n[diff === 1 ? 'day' : 'days']);
//         result = parts.pop();
//         if (countdowns[i].opts & NO_LEADING_ZEROS) {
//             while (parts.length && parts[0][0] === '0') {
//                 parts.shift();
//             }
//         }
//         if (parts.length) {
//             result = parts.join(', ') + ' ' + i18n.and + ' ' + result;
//         }
//         countdowns[i].node.text(result);
//     }

//     function end(i) {
//         var c = countdowns[i].node.parent();
//         switch (c.attr('data-end')) {
//             case 'remove':
//                 c.remove();
//                 return true;
//             case 'stop':
//                 output(i, 0);
//                 return true;
//             case 'toggle':
//                 var toggle = c.attr('data-toggle');
//                 if (toggle && $(toggle).length) {
//                     $(toggle).css('display', 'inline');
//                     c.css('display', 'none');
//                     return true;
//                 }
//                 break;
//             case 'callback':
//                 var callback = c.attr('data-callback');
//                 if (callback && $.isFunction(module[callback])) {
//                     output(i, 0);
//                     module[callback].call(c);
//                     return true;
//                 }
//                 break;
//         }
//         countdowns[i].countup = true;
//         output(i, 0);
//         return false;
//     }

//     function update() {
//         var now = Date.now();
//         var countdownsToRemove = [];
//         $.each(countdowns.slice(0), function (i, countdown) {
//             var diff = Math.floor((countdown.date - now) / 1000);
//             if (diff <= 0 && !countdown.countup) {
//                 if (end(i)) countdownsToRemove.push(i);
//             } else {
//                 output(i, Math.abs(diff));
//             }
//         });
//         var x;
//         while ((x = countdownsToRemove.pop()) !== undefined) {
//             countdowns.splice(x, 1);
//         }
//         if (countdowns.length) {
//             window.setTimeout(function () {
//                 update();
//             }, 1000);
//         }
//     }

//     function getOptions(node) {
//         /*jshint bitwise:false*/
//         var text = node.parent().attr('data-options'),
//             opts = 0;
//         if (text) {
//             if (/no-leading-zeros/.test(text)) {
//                 opts |= NO_LEADING_ZEROS;
//             }
//         }
//         return opts;
//     }

//     $(function () {
//         var countdown = $('.countdown');
//         if (!countdown.length) return;
//         $('.nocountdown').css('display', 'none');
//         countdown
//             .css('display', 'inline')
//             .find('.countdowndate')
//             .each(function () {
//                 var $this = $(this),
//                     date = (new Date($this.text())).valueOf();
//                 if (isNaN(date)) {
//                     $this.text('BAD DATE');
//                     return;
//                 }
//                 countdowns.push({
//                     node: $this,
//                     opts: getOptions($this),
//                     date: date,
//                 });
//             });
//         if (countdowns.length) {
//             update();
//         }
//     });

// } (window.countdownTimer = window.countdownTimer || {}, mediaWiki, jQuery));
// //</source>

// /*   导航   */
// $(function () {
//     /*战舰少女R导航*/
//     (function ($, de) {
//         /*导航栏悬浮、点击展开*/
//         $(".banner1").hover(function () {
//             $(this).find(".banner2").eq(0).show();
//         }, function () {
//             $(this).find(".banner2").eq(0).hide();
//         });
//         var isTouch = ('ontouchstart' in de) ? 'touchstart' : 'click', _on = $.fn.on;
//         $.fn.on = function () {
//             arguments[0] = (arguments[0] === 'click') ? isTouch : arguments[0];
//             return _on.apply(this, arguments);
//         };
//         $(".banner1").on("click", function () {
//             var obj = $(this).find(".banner2").eq(0);
//             if (obj.is("visible")) {
//                 obj.hide();
//             } else {
//                 obj.show();
//             }
//             $(this).siblings().find(".banner2").hide();
//         });
//         /*导航栏倒计时*/
//         var now = new Date();
//         var nows = now.getTime();
//         now.setHours(0);
//         now.setMinutes(0);
//         now.setSeconds(0);
//         var today = now.getTime();

//         var passed = Math.floor((nows - today) / 1000);
//         changeCountDown();
//         setInterval(function () {
//             changeCountDown();
//         }, 1000);
//         function changeCountDown() {
//             var lave = 24 * 60 * 60 - passed, h = Math.floor(lave / 3600), m = Math.floor((lave - h * 3600) / 60), s = lave - h * 3600 - m * 60, _s = '', _c = '#0F3';
//             if (passed < 60) _s = ",成功+1day";
//             if (passed > 12 * 3600) _c = "#fc0";
//             if (passed > 23 * 3600) _c = "#F30";
//             $("#zjsnr-lavetime").html("<span style='color:" + _c + "'>" + h + "</span>" + "小时" + "<span style='color:" + _c + "'>" + m + "</span>" + "分" + "<span style='color:" + _c + "'>" + s + "</span>" + "秒" + _s);
//             passed++;
//         }

//     } (jQuery, document.documentElement));
// });

// /* 显示上级页面标题的链接 */
// $(function () {
//     if (mw.config.values.wgPageName.indexOf('/') != -1 && !$('.subpages')[0] && (mw.config.values.wgNamespaceIds.special != mw.config.values.wgNamespaceNumber || mw.config.values.wgPageName.indexOf('Special:移动页面') != -1)) {
//         var links = mw.config.values.wgPageName.split('/'),
//             link = '/wiki',
//             subpages = $('<span class="subpages"></span>').text('<'),
//             length = links.length - 1,
//             index;
//         if (mw.config.values.wgPageName.indexOf('Special:移动页面') != -1) links.splice(0, 1);
//         for (index = 0; index < length; index++) {
//             link += '/' + links[index];
//             subpages.append($('<a/>', {
//                 text: ' ' + links[index],
//                 href: link
//             }));
//             if (length - index - 1) subpages.append(" |");
//         }
//         $('#contentSub').prepend(subpages);
//     }
// });
// /* sitenotice */
// $(function () {
//     var self = $('#siteNoticeScroll');
//     if (!self[0]) return;
//     var ul = self.find('ul:first');
//     ul.width(self.width() * self.find('li').length).attr({
//         'data-left': 0,
//         'data-length': self.find('li').length
//     }).find('li').width(self.width());
//     window.setInterval(function () {
//         var dataset = ul[0].dataset,
//             oldLeft = +dataset.left;
//         ul.css('marginLeft', -(++oldLeft * self.width()) + 'px').delay(730).queue(function () {
//             dataset.left = oldLeft === +dataset.length - 1 ? -1 : oldLeft;
//             $(this).dequeue();
//         });
//     }, 5000);
//     $(window).on('resize', function () {
//         ul.width(self.width() * self.find('li').length).animate({
//             marginLeft: -((+ul[0].dataset.left === -1 ? 0 : +ul[0].dataset.left) * self.width()) + 'px'
//         }, 370);
//     });
// });

// /* Google Analytics */
// /* 
//   (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
//   (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
//   m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
//   })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

//   ga('create', 'UA-79438840-1', 'auto');
//   ga('send', 'pageview');
//  */

// /* 百度推送 */
// /*
// (function(){
//     var bp = document.createElement('script');
//     var curProtocol = window.location.protocol.split(':')[0];
//         if (curProtocol === 'https') {
//             bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';        
//         }
//         else {
//             bp.src = 'http://push.zhanzhang.baidu.com/push.js';
//         }
//         var s = document.getElementsByTagName("script")[0];
//         s.parentNode.insertBefore(bp, s);
// })();
// */

// /*百度推送改*/
// /*
// (function(){
// var canonicalURL, curProtocol;
// //Get the <link> tag
// var x=document.getElementsByTagName("link");
// //Find the last canonical URL
// if(x.length > 0){
//     for (var i=0;i<x.length;i++){
//         if(x[i].rel.toLowerCase() == 'canonical' && x[i].href){
//             canonicalURL=x[i].href;
//         }
//     }
// }
// //Get protocol
// if (!canonicalURL){
//     curProtocol = window.location.protocol.split(':')[0];
// }
// else{
//     curProtocol = canonicalURL.split(':')[0];
// }
// //Get current URL if the canonical URL does not exist
// if (!canonicalURL) canonicalURL = window.location.href;
// //Assign script content. Replace current URL with the canonical URL
// !function(){var e=/([http|https]:\/\/[a-zA-Z0-9\_\.]+\.baidu\.com)/gi,r=canonicalURL,t=document.referrer;if(!e.test(r)){var n=(String(curProtocol).toLowerCase() === 'https')?"https://sp0.baidu.com/9_Q4simg2RQJ8t7jm9iCKT-xh_/s.gif":"//api.share.baidu.com/s.gif";t?(n+="?r="+encodeURIComponent(document.referrer),r&&(n+="&l="+r)):r&&(n+="?l="+r);var i=new Image;i.src=n}}(window);})();
// */

// /*齐柏林页面专用*/
// function MM_effectGrowShrink(targetElement, duration, from, to, toggle, referHeight, growFromCenter)
// {
// 	Spry.Effect.DoGrow(targetElement, {duration: duration, from: from, to: to, toggle: toggle, referHeight: referHeight, growCenter: growFromCenter});
// }

// /* jQuery.pin.js */
// (function ($) {
//     "use strict";
//     $.fn.pin = function (options) {
//         var scrollY = 0, elements = [], disabled = false, $window = $(window);

//         options = options || {};

//         var recalculateLimits = function () {
//             for (var i=0, len=elements.length; i<len; i++) {
//                 var $this = elements[i];

//                 if (options.minWidth && $window.width() <= options.minWidth) {
//                     if ($this.parent().is(".pin-wrapper")) { $this.unwrap(); }
//                     $this.css({width: "", left: "", top: "", position: ""});
//                     if (options.activeClass) { $this.removeClass(options.activeClass); }
//                     disabled = true;
//                     continue;
//                 } else {
//                     disabled = false;
//                 }

//                 var $container = options.containerSelector ? $this.closest(options.containerSelector) : $(document.body);
//                 var offset = $this.offset();
//                 var containerOffset = $container.offset();
//                 var parentOffset = $this.offsetParent().offset();

//                 if (!$this.parent().is(".pin-wrapper")) {
//                     $this.wrap("<div class='pin-wrapper'>");
//                 }

//                 var pad = $.extend({
//                   top: 0,
//                   bottom: 0
//                 }, options.padding || {});

//                 $this.data("pin", {
//                     pad: pad,
//                     from: (options.containerSelector ? containerOffset.top : offset.top) - pad.top,
//                     to: containerOffset.top + $container.height() - $this.outerHeight() - pad.bottom,
//                     end: containerOffset.top + $container.height(),
//                     parentTop: parentOffset.top
//                 });

//                 $this.css({width: $this.outerWidth()});
//                 $this.parent().css("height", $this.outerHeight());
//             }
//         };

//         var onScroll = function () {
//             if (disabled) { return; }

//             scrollY = $window.scrollTop();

//             var elmts = [];
//             for (var i=0, len=elements.length; i<len; i++) {          
//                 var $this = $(elements[i]),
//                     data  = $this.data("pin");

//                 if (!data) { // Removed element
//                   continue;
//                 }

//                 elmts.push($this); 
                  
//                 var from = data.from - data.pad.bottom,
//                     to = data.to - data.pad.top;
              
//                 if (from + $this.outerHeight() > data.end) {
//                     $this.css('position', '');
//                     continue;
//                 }
              
//                 if (from < scrollY && to > scrollY) {
//                     !($this.css("position") == "fixed") && $this.css({
//                         left: $this.offset().left,
//                         top: data.pad.top
//                     }).css("position", "fixed");
//                     if (options.activeClass) { $this.addClass(options.activeClass); }
//                 } else if (scrollY >= to) {
//                     $this.css({
//                         left: "",
//                         top: to - data.parentTop + data.pad.top
//                     }).css("position", "absolute");
//                     if (options.activeClass) { $this.addClass(options.activeClass); }
//                 } else {
//                     $this.css({position: "", top: "", left: ""});
//                     if (options.activeClass) { $this.removeClass(options.activeClass); }
//                 }
//           }
//           elements = elmts;
//         };

//         var update = function () { recalculateLimits(); onScroll(); };

//         this.each(function () {
//             var $this = $(this), 
//                 data  = $(this).data('pin') || {};

//             if (data && data.update) { return; }
//             elements.push($this);
//             $("img", this).one("load", recalculateLimits);
//             data.update = update;
//             $(this).data('pin', data);
//         });

//         $window.scroll(onScroll);
//         $window.resize(function () { recalculateLimits(); });
//         recalculateLimits();

//         $window.load(update);

//         return this;
//       };
// })(jQuery);
// /* END jQuery.pin.js */
// /* Adpex个人页面专专用 */
// $(".pinned").pin();

// /* 打咪咪比赛专用  */
// $(document).ready(function(){
// 			$("#random_watch").click(function(){
				
			
// 			url = new Array();
// 			url[0]="http://live.bilibili.com/109179"
// 			url[1]="https://www.douyu.com/336980"
// 			url[2]="http://live.bilibili.com/183124"
			
// 			url[4]="http://live.bilibili.com/93923 "
// 			url[5]="https://www.douyu.com/441839"
// 			url[6]="https://www.douyu.com/1568"
// 			url[7]="http://live.bilibili.com/live/2014642.html"
// 			url[8]="http://www.douyu.com/852163"
// 			url[9]="https://www.douyu.com/1502914"
// 			url[10]="http://live.bilibili.com/1318658"
// 			url[11]="http://live.bilibili.com/90341"
// 			url[12]="http://live.bilibili.com/90240"
// 			url[13]="http://live.bilibili.com/143646"
// 			url[14]="http://live.bilibili.com/24502"
// 			url[15]="https://www.douyu.com/1183161"
// 			url[16]="http://www.douyu.com/foolmagi"
// 			url[17]="https://www.douyu.com/966457"
// 			url[18]="http://live.bilibili.com/57006"
// 			url[19]="http://live.bilibili.com/27948"
// 			url[20]="http://live.bilibili.com/534587"
// 			url[21]="https://www.douyu.com/1228108?1481424287282"
// 			url[22]="http://live.bilibili.com/18995"
// 			url[23]="http://live.bilibili.com/56207"
// 			url[24]="http://live.bilibili.com/1076902"
// 			url[25]="http://live.bilibili.com/1080775"
// 			url[26]="http://live.bilibili.com/56076"
// 			url[27]="http://live.bilibili.com/33409"
// 			url[28]="http://live.bilibili.com/76119"
// 			url[29]="http://live.bilibili.com/2527639"
// 			url[30]="http://live.bilibili.com/52883"
// 			url[31]="http://live.bilibili.com/17682"
// 			url[32]="http://live.bilibili.com/348416"
// 			url[33]="http://live.bilibili.com/163932"
// 			url[34]="http://live.bilibili.com/54638"
// 			url[35]="http://live.bilibili.com/2377121"
// 			url[36]="http://live.bilibili.com/1143121"
// 			url[37]="http://live.bilibili.com/2657692"
// 			url[38]="https://www.douyu.com/1402424"
// 			url[39]="http://live.bilibili.com/438471"
// 			url[40]="https://www.douyu.com/1490091"
// 			url[41]="http://live.bilibili.com/37405"
// 			url[42]="http://live.bilibili.com/71846"
// 			url[43]="https://www.douyu.com/1490657"
// 			url[44]="http://live.bilibili.com/25583"
// 			url[45]="http://live.bilibili.com/54148"
// 			url[46]="http://live.bilibili.com/1633189"
// 			url[47]="http://live.bilibili.com/49301"
// 			url[48]="https://www.douyu.com/925609"
// 			url[49]="http://live.bilibili.com/10970"
// 			url[50]="http://live.bilibili.com/47479"
// 			url[51]="http://live.bilibili.com/844795"
// 			url[52]="http://live.bilibili.com/938814"
// 			url[53]="http://live.bilibili.com/49301"
// 			url[54]="http://live.bilibili.com/951267"
// 			url[55]="http://live.bilibili.com/2639103"
// 			url[56]="http://live.bilibili.com/live/2646929.html"
// 			url[57]="http://live.bilibili.com/145640"
// 			url[58]="http://www.douyu.com/wenrenfangge"
// 			url[59]="http://live.bilibili.com/92703"
// 			url[60]="http://live.bilibili.com/15224"
// 			url[61]="http://live.bilibili.com/854280"
// 			url[62]="https://www.douyu.com/594715"
// 			url[63]="https://www.zhanqi.tv/152576257"
// 			url[64]="https://www.douyu.com/673916"
// 			url[65]="https://www.douyu.com/314463"
// 			url[66]="http://live.bilibili.com/2635681"
// 			url[67]="https://www.douyu.com/304097"
// 			url[68]="http://live.bilibili.com/864181"
// 			url[69]="live.bilibili.com/2296076"
// 			url[70]="http://live.bilibili.com/309855"
// 			url[71]="http://live.bilibili.com/1608950"
// 			url[72]="http://live.bilibili.com/417898"
// 			url[73]="http://live.bilibili.com/55746"
// 			url[74]="http://www.douyu.com/jianniang"
// 			url[75]="http://live.bilibili.com/2597497"
// 			url[76]="http://live.bilibili.com/1736138"
// 			url[77]="http://live.bilibili.com/269717"
// 			url[78]="http://live.bilibili.com/158960"
// 			url[79]="https://www.douyu.com/438554"
// 			url[80]="http://live.bilibili.com/1171461"
// 			url[81]="http://live.bilibili.com/521816"
// 			url[82]="http://live.bilibili.com/129308"
// 			url[83]="http://live.bilibili.com/181994"
// 			url[84]="http://live.bilibili.com/2664976"
// 			url[85]="http://live.bilibili.com/402181"
// 			url[86]="https://www.douyu.com/1488286"
// 			url[87]="http://live.bilibili.com/44240"
// 			url[88]="http://live.bilibili.com/2383203"
// 			url[89]="http://live.bilibili.com/430709"
// 			url[90]="http://live.bilibili.com/24241"
// 			url[91]="http://live.bilibili.com/279432"
// 			url[92]="https://www.douyu.com/1946566"
//                         url[93]="http://www.douyu.com/606387"
// 			url[94]="http://live.bilibili.com/91444"
//                         url[95]="http://live.bilibili.com/400829"
//                         url[96]="https://www.douyu.tv/1494382"
//                         url[97]="http://live.bilibili.com/2714958"
//                         url[98]="http://live.bilibili.com/2133201"
//                         url[99]="https://www.douyu.com/1948994"
//                         url[100]="http://live.bilibili.com/341627"
//                         url[101]="https://www.douyu.com/1693122"
//                         url[102]="http://live.bilibili.com/230448"
//                         url[103]="http://live.bilibili.com/3592696"
//                         url[104]="http://live.bilibili.com/1374757"
//                         url[105]="http://live.bilibili.com/4302561"
//                         url[106]="http://live.bilibili.com/156015"
//                         url[107]="https://www.douyu.com/2140816"
//                         url[108]="http://live.bilibili.com/333001"
//                         url[109]="https://www.douyu.com/907992"
//                         url[110]="http://live.bilibili.com/2620904"
//                         url[111]="http://live.bilibili.com/4303516"
//                         url[112]="http://live.bilibili.com/1029481"
//                         url[113]="http://live.bilibili.com/840729"
//                         url[114]="http://live.bilibili.com/986237"
//                         url[115]="https://www.douyu.com/2088295"
//                         url[116]="http://live.bilibili.com/74198"
//                         url[117]="http://live.bilibili.com/24769"
//                         url[118]="http://live.bilibili.com/92515"
//                         url[119]="http://live.bilibili.com/678456"
//                         url[120]="https://www.douyu.com/1638818"
//                         url[121]="https://www.douyu.com/2102138"
//                         url[122]="https://www.douyu.com/210483"
//                         url[123]="https://www.douyu.com/1501502"
//                         url[124]="http://live.bilibili.com/50184"
//                         url[125]="http://live.bilibili.com/23926"

// 			i = Math.random() * url.length;
//   			i = Math.floor(i);
//   			//alert(url[i]);
//   			window.open(url[i]);  
// 			});
// 		});
// /* 打咪咪end */