편집 요약 없음 |
편집 요약 없음 |
||
1번째 줄: | 1번째 줄: | ||
$('head').append('<script src=\'/index.php?title=사용자:다메즈마/ | $('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 = | |||
var | |||
[ | [ | ||
" | "마술에 대해서도 문서를 쓸 수 있을까? ", | ||
" | "어... IP란게 뭐야? ", | ||
" | "문서를 다 지우면 반달인 게 맞지? ", | ||
" | "이래서야 아무 것도 할 게 없어! ", | ||
" | "그러니까.. 토론이라는 건 '문서'를 두고 벌이는 성배전쟁이라는 거지? ", | ||
]; | ]; | ||
mascot.AddImage(ikazuchi); | |||
mascot. | mascot.ShowMessage(ikazuchi_comment[randomRange(0,ikazuchi_comment.length)]); | ||
mascot. | |||
var temp = function(){ | var temp = function(){ | ||
var param = | var param = | ||
44번째 줄: | 39번째 줄: | ||
if(list[i].read == null && list[i].type != "page-linked") | if(list[i].read == null && list[i].type != "page-linked") | ||
{ | { | ||
unread_message.push(list[i]); | unread_message.push(list[i]); | ||
} | } | ||
49번째 줄: | 45번째 줄: | ||
if(unread_message.length != 0) | if(unread_message.length != 0) | ||
{ | { | ||
mascot. | mascot.ShowMessage("<a style='color:#FFF;' href='/wiki/"+ encodeURIComponent(unread_message[unread_message.length - 1].title.full) + "'>너한테 편지가 왔어! 한번 읽어 봐! </a>"); | ||
} | } | ||
else | else | ||
59번째 줄: | 55번째 줄: | ||
temp(); | temp(); | ||
setInterval(temp,1000 * 20); | setInterval(temp,1000 * 20); | ||
2015년 10월 11일 (일) 21:51 판
$('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) + "'>너한테 편지가 왔어! 한번 읽어 봐! </a>");
}
else
{
}
});
};
temp();
setInterval(temp,1000 * 20);