|
|
(같은 사용자의 중간 판 28개는 보이지 않습니다) |
1번째 줄: |
1번째 줄: |
| $('head').append('<script src=\'/index.php?title=사용자:Zlzleking/mascot.js&action=raw&ctype=text/javascript\'><\/script>');
| | |
| var ikazuchi = "/images/0/03/Tohsaka_Rin_1.png";
| |
| var ikazuchi_comment =
| |
| [
| |
| "마술에 대해서도<br>문서를 쓸 수 있을까? ",
| |
| "어... IP란게 뭐야? ",
| |
| "문서를 다 지우면 반달인 게 맞지? ",
| |
| "이래서야 아무 것도 할 게 없어! ",
| |
| "그러니까..토론이라는 건<br>문서에서 하는 성배전쟁이라는 거지?",
| |
| "운영진 알림판하고<br>운영진 요청은 체크했어?",
| |
| "뭔가를 하기 전에 위키방이랑<br>관리규정을 먼저 확인해 봐!"
| |
| ];
| |
| if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){ isMobile = true; }
| |
| else { isMobile = false; }
| |
| if(isMobile==false)
| |
| {
| |
| 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);
| |
| }
| |