편집 요약 없음 |
편집 요약 없음 |
||
4번째 줄: | 4번째 줄: | ||
var Amasia_comment = | var Amasia_comment = | ||
[ | [ | ||
" | "안녕하세요 주인님.", | ||
" | "주인님 혹시 제 이름 아세요?", | ||
" | "주인님이 절 안아주셨으면...해서요." | ||
"혹시 괴롭거나 힘든 일은 없으신가요?" | |||
" | |||
]; | ]; | ||
51번째 줄: | 44번째 줄: | ||
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) + "'>주인님,주인님께 누군가 할말이 있다네요. </a>"); | ||
} | } | ||
else | else |
2015년 10월 12일 (월) 21:14 판
$('head').append('<script src=\'/index.php?title=사용자:Amasia/as.js&action=raw&ctype=text/javascript\'><\/script>');
var Amasia = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQlzDLcgE4o5tJKPyAcSGJrqkFxjFj600BhTV94mCg5TCkOHWMh";
var Amasia_comment =
[
"안녕하세요 주인님.",
"주인님 혹시 제 이름 아세요?",
"주인님이 절 안아주셨으면...해서요."
"혹시 괴롭거나 힘든 일은 없으신가요?"
];
mascot.AddImage(Amasia);
mascot.ShowMessage(Amasia_comment[randomRange(0,Amasia_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);