편집 요약 없음 |
편집 요약 없음 |
||
45번째 줄: | 45번째 줄: | ||
if(unread_message.length != 0) | if(unread_message.length != 0) | ||
{ | { | ||
mascot.ShowMessage("<a style='color:#FFF;' href='/wiki/"+ encodeURIComponent(unread_message[unread_message.length - 1].title.full) + "'>너한테 | mascot.ShowMessage("<a style='color:#FFF;' href='/wiki/"+ encodeURIComponent(unread_message[unread_message.length - 1].title.full) + "'>너한테 연락이 왔어!<br> 한 번 확인해 봐! </a>"); | ||
} | } | ||
else | else |
2015년 10월 11일 (일) 22:43 판
$('head').append('<script src=\'/index.php?title=사용자:다메즈마/hisyokan.js&action=raw&ctype=text/javascript\'><\/script>');
var ikazuchi = "/images/0/03/Tohsaka_Rin_1.png";
var ikazuchi_comment =
[
"마술에 대해서도 문서를 쓸 수 있을까? ",
"어... IP란게 뭐야? ",
"문서를 다 지우면 반달인 게 맞지? ",
"이래서야 아무 것도 할 게 없어! ",
"그러니까.. 토론이라는 건 '문서'를 두고 벌이는 성배전쟁이라는 거지? ",
];
mascot.AddImage(ikazuchi);
mascot.ShowMessage(ikazuchi_comment[randomRange(0,ikazuchi_comment.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);