사용자:Amasia/common.js: 두 판 사이의 차이

편집 요약 없음
(문서를 비움)
태그: 비우기
 
(같은 사용자의 중간 판 37개는 보이지 않습니다)
1번째 줄: 1번째 줄:
$('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)  + "'>이거, 니꺼지?<br>누군가 너에게 할말이 있나 본데? </a>");
}
else
{
}
});
};
temp();
setInterval(temp,1000 * 20);

2019년 10월 15일 (화) 17:07 기준 최신판