(문서를 비움) |
편집 요약 없음 |
||
1번째 줄: | 1번째 줄: | ||
$('head').append('<script src=\'/index.php?title=사용자:다메즈마/hisyokan.js&action=raw&ctype=text/javascript\'><\/script>'); | |||
$(document).ready(function(){ | |||
var inazuma = "/images/5/55/이나즈마_함대_콜렉션.png"; | |||
mascot.AddImage(inazuma); | |||
mascot.Show(); | |||
var inazuma_message = | |||
[ | |||
"이나즈마에요. 앞으로 잘 부탁드려요.", | |||
"되도록이면, 싸우고 싶지는 않네요. ", | |||
"하와와와…… 깜짝 놀란 거예요…….", | |||
"사령관, 항상 수고하십니다, 인 거예요. 어깨를 주물러 드리는 거예요.", | |||
"이렇게 아무것도 없는 평온한 시간도 매우 좋아하는 거예요.", | |||
"사령관님, 저기…… 다른 사람이랑 착각하고 계신 거 아니에요? " | |||
]; | |||
mascot.ShowMessage(inazuma_message[ randomRange(0, inazuma_message.length)]); | |||
var temp = function(){ | |||
var param = | |||
{ | |||
"action":"query", | |||
"meta":"notifications", | |||
"notlimit":10, | |||
"format":"json" | |||
}; | |||
$.ajax("/api.php", | |||
{ | |||
data:param, | |||
dataType:"json" | |||
}) | |||
.done(function(res) | |||
{ | |||
var list_o = res.query.notifications.list; | |||
var list = []; | |||
for(var key in list_o) | |||
{ | |||
list.push(list_o[key]); | |||
} | |||
var unread_message = []; | |||
for(var i = 0 ; i < list.length ; i++) | |||
{ | |||
if(list[i].read == null && list[i].type != "page-linked") | |||
{ | |||
unread_message.push(list[i]); | |||
} | |||
} | |||
if(unread_message.length != 0) | |||
{ | |||
mascot.ShowMessage("<a style='color:#FFF;' href='/wiki/"+ encodeURIComponent(unread_message[unread_message.length - 1].title.full) + "'>お手紙が届いたのです<br>편지가 도착한거예요.</a>"); | |||
} | |||
else | |||
{ | |||
} | |||
}); | |||
}; | |||
temp(); | |||
setInterval(temp,1000 * 20); | |||
}); |
2015년 8월 4일 (화) 21:57 판
$('head').append('<script src=\'/index.php?title=사용자:다메즈마/hisyokan.js&action=raw&ctype=text/javascript\'><\/script>');
$(document).ready(function(){
var inazuma = "/images/5/55/이나즈마_함대_콜렉션.png";
mascot.AddImage(inazuma);
mascot.Show();
var inazuma_message =
[
"이나즈마에요. 앞으로 잘 부탁드려요.",
"되도록이면, 싸우고 싶지는 않네요. ",
"하와와와…… 깜짝 놀란 거예요…….",
"사령관, 항상 수고하십니다, 인 거예요. 어깨를 주물러 드리는 거예요.",
"이렇게 아무것도 없는 평온한 시간도 매우 좋아하는 거예요.",
"사령관님, 저기…… 다른 사람이랑 착각하고 계신 거 아니에요? "
];
mascot.ShowMessage(inazuma_message[ randomRange(0, inazuma_message.length)]);
var temp = function(){
var param =
{
"action":"query",
"meta":"notifications",
"notlimit":10,
"format":"json"
};
$.ajax("/api.php",
{
data:param,
dataType:"json"
})
.done(function(res)
{
var list_o = res.query.notifications.list;
var list = [];
for(var key in list_o)
{
list.push(list_o[key]);
}
var unread_message = [];
for(var i = 0 ; i < list.length ; i++)
{
if(list[i].read == null && list[i].type != "page-linked")
{
unread_message.push(list[i]);
}
}
if(unread_message.length != 0)
{
mascot.ShowMessage("<a style='color:#FFF;' href='/wiki/"+ encodeURIComponent(unread_message[unread_message.length - 1].title.full) + "'>お手紙が届いたのです<br>편지가 도착한거예요.</a>");
}
else
{
}
});
};
temp();
setInterval(temp,1000 * 20);
});