참고: 설정을 저장한 후에 바뀐 점을 확인하기 위해서는 브라우저의 캐시를 새로 고쳐야 합니다. 구글 크롬, 파이어폭스, 마이크로소프트 엣지, 사파리: ⇧ Shift 키를 누른 채 "새로 고침" 버튼을 클릭하십시오. 더 자세한 정보를 보려면 위키백과:캐시 무시하기 항목을 참고하십시오.

/*

var viewpage="사용자토론:Pocket/2009" ; // 메시지 띄울 문서명

/* ********** wikED ********** */
// install the Korean translation for [[:en:User:Cacycle/wikEd]]
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Ilovesabbath/wikEd_international_ko.js'
+ '&action=raw&ctype=text/javascript"></script>');
// install [[:en:User:Cacycle/wikEd]] in-browser text editor
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
 
/* ********** 사용자:Pocket 으로 자동 이동하는 스크립트 ********** */
// 실행은 잘 안되는듯... 
var mpTitle = "대문";
var isMainPage = (document.title.substr(0, document.title.lastIndexOf(" - ")) == mpTitle)
if (isMainPage) 
{window.location="http://ko.wikipedia.org/wiki/User:Pocket";}

/* ********** 편집요약 상용구 ********** */
/*
== [[위키백과:도구/편집요약 상용구]] ==
*/
esEditSummaries = new Array(
/*
new Array('버튼 이름', '입력될 편집 요약', '툴팁으로 뜨는 설명(생략 가능)', '사소한 편집 여부(0/1 혹은 true/false, 생략 가능)', '상용구 넣기 전에 요약 지우기(0/1 혹은 true/false, 생략 가능)')
위와 같은 형식으로 새로운 버튼을 추가할 수 있습니다.
마지막 줄을 제외한 줄 끝에 쉼표가 들어가 있는지 확인해 주세요.
*/
    new Array('알림', '알림', '문서관련 편집 알림'),
    new Array('주의', '주의 알림', '주의 알림'),
    new Array('의견', '의견 게재', '의견을 게제함'),
    new Array('초상', '초상권 경고틀 붙임', '초상권 경고틀 붙임'),
    new Array('삭', '삭제 신청', '삭제 신청 틀을 담'),
    new Array('삭토', '삭제 토론', '삭제 토론 틀을 담'),
    new Array('인터', '인터위키', '인터위키 추가, 삭제 및 정리'),
    new Array('정리', '문서 정리', '문서의 모양 및 구성을 정리함'),
    new Array('중립', '중립적 시각', '중립적 시각 틀을 담'),
    new Array('토막', '토막글', '토막글 틀을 담'),
    new Array('넘', '넘겨주기', '다른 문서로의 넘겨주기로 바꿈'),
    new Array('넘나', '넘나들기', '다른 문서로의 넘나들기로 바꿈'),
    new Array('동음', '동음이의', '동음이의 문서로 바꿈'),
    new Array('뜻', '다른 뜻', '다른 뜻 틀을 담'),
    new Array('분류', '분류', '분류 추가, 삭제 및 정리'),
    new Array('분할', '문서 분할', '다른 문서와의 병합을 제안하거나 실행함'),
    new Array('합', '문서 병합', '다른 문서와의 병합을 제안하거나 실행함')
);


/* ********** 내비게이션 팝업 ********** */
document.write('<script type="text/javascript" src="' 
             + 'http://ko.wikipedia.org/w/index.php?title=User:Dus2000/string-navpop.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
mw.loader.load(
             'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'
             + '&action=raw&ctype=text/javascript&dontcountme=s');


/* ********** 주시목록 알림 ********** */
/* Watchlist notifier ([[User:Ais523/watchlistnotifier.js]]); displays a message every time a watched page changes. */
//<pre><nowiki>

var wmwpajax;
// From [[WP:US]] mainpage (wpajax renamed to wmwpajax)
wmwpajax={
        download:function(bundle) {
                // mandatory: bundle.url
                // optional:  bundle.onSuccess (xmlhttprequest, bundle)
                // optional:  bundle.onFailure (xmlhttprequest, bundle)
                // optional:  bundle.otherStuff OK too, passed to onSuccess and onFailure
                
                var x = window.XMLHttpRequest ? new XMLHttpRequest()
                : window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP")
                : false;
                
                if (x) {
                        x.onreadystatechange=function() {
                                x.readyState==4 && wmwpajax.downloadComplete(x,bundle);
                        };
                        x.open("GET",bundle.url,true);
                        x.send(null); 
                }
                return x;
        },

        downloadComplete:function(x,bundle) {
                x.status==200 && ( bundle.onSuccess && bundle.onSuccess(x,bundle) || true )
                || ( bundle.onFailure && bundle.onFailure(x,bundle) || alert(x.statusText+': '+bundle.url));
        }
};

// Example:
// function dlComplete(xmlreq, data) {
//      alert(data.message + xmlreq.responseText);
// }
//  wmwpajax.download({url:'http://en.wikipedia.org/w/index.php?title=Thresher&action=raw', 
//                   onSuccess: dlComplete, message: "Here's what we got:\n\n" });

// End of [[WP:US]] quote

function wmWatchEditFound(xmlreq, data) {
  var watchrev, watchsum, watchrevold, watchpage, sumtmp, junk;
  if(xmlreq.responseText.indexOf('revid=')==-1)
  {
    document.getElementById('contentSub').innerHTML+=
      "<div class='watchlistnotify'>(<i>watchlistnotifier can't determine whether a "+
      "watched page has changed<i>)</div>";
    return;
  }
  watchrev=xmlreq.responseText.split('revid="')[1].split('"')[0];
  try
  {
    watchrevold=document.cookie.split('ais523wmwatchrev=')[1].split('.')[0];
  }
  catch(junk) {watchrevold=0;}
//  if(wgPageName == "Special:Watchlist")
  if(wgPageName == "특수기능:주시문서목록")
  {
    document.cookie="ais523wmwatchrev="+watchrev+".; path=/";
    var aas=document.getElementById('bodyContent').getElementsByTagName('a');
    var i=aas.length;
    while(i--)
    {
      if(aas[i].href.indexOf('diff=')!=-1&&watchrevold)
        if(+(aas[i].href.split('diff=')[1].split('&')[0])>watchrevold)
          aas[i].parentNode.style.fontWeight='bold';
    }
  }
  else
  {
    watchsum=xmlreq.responseText.split('comment="')[1].split('"')[0];
    watchpage=xmlreq.responseText.split('title="')[1].split('"')[0];
    watchuser=xmlreq.responseText.split('user="')[1].split('"')[0];
    watchsum=watchsum.split('<').join('&lt;').split('>').join('&gt;');
    sumtmp=watchsum.split('/* ')[1].split(' */')[0];
    sumtmp=sumtmp.split(' ').join('_');
    watchpage=watchpage.split('<').join('&lt;').split('>').join('&gt;');
    watchuser=watchuser.split('<').join('&lt;').split('>').join('&gt;');
    if(watchrev!=watchrevold)
      document.getElementById('contentSub').innerHTML+='<div class="watchlistnotify">'+
      '바로가기 <a href="/wiki/특수기능:최근바뀜">최근바뀜</a> - '+
      '<a href="/wiki/위키백과:질문방">질문방</a> - '+
      '<a href="/wiki/위키백과:사랑방">사랑방</a> - '+
      '<a href="/wiki/특수기능:파일">파일목록</a> - '+
      '<a href="/wiki/특수기능:새파일">새파일</a> - '+
      '<a href="/wiki/특수기능:접두어찾기/사용자:Pocket">내하부문서</a><br>'+
      '"'+watchpage+'" changed by '+watchuser+': "'+watchsum+
      '". (<a href="/wiki/'+watchpage+'#'+sumtmp+'">바로가기</a>)</div>';
/*      document.getElementById('contentSub').innerHTML+=
        "<div class='watchlistnotify'>\""+watchpage+'" changed by '+
        watchuser+': "'+watchsum+
        '". (<a href="/wiki/Special:Watchlist">watchlist</a>)</div>';
*/ 
  }
}


/* ********** 토론(하부문서) 변경 알림 ********** */

function wmTalkEditFound(xmlreq, data) {
  var talkrev, talksum, talkrevold, talkpage, junk;
  if(xmlreq.responseText.indexOf('revid=')==-1)
  {
    document.getElementById('contentSub').innerHTML+=
      "<div class='usermessage'>(<i>토론문서 알림 : 토론내용의 변경여부를 "+
      "확인할 수 없습니다.<i>)</div>";
    return;
  }
  talkrev=xmlreq.responseText.split('revid="')[1].split('"')[0];
  try
  {
    talkrevold=document.cookie.split('pocketwmtalkrev=')[1].split('.')[0];
  }
  catch(junk) {talkrevold=0;}

  if(wgPageName == viewpage)
  {
    document.cookie="pocketwmtalkrev="+talkrev+".; path=/";
    var aas=document.getElementById('bodyContent').getElementsByTagName('a');
    var i=aas.length;
    while(i--)
    {
      if(aas[i].href.indexOf('diff=')!=-1&&talkrevold)
        if(+(aas[i].href.split('diff=')[1].split('&')[0])>talkrevold)
          aas[i].parentNode.style.fontWeight='bold';
    }
  }
  else
  {
    talksum=xmlreq.responseText.split('comment="')[1].split('"')[0];
    talkpage=xmlreq.responseText.split('title="')[1].split('"')[0];
    talkuser=xmlreq.responseText.split('user="')[1].split('"')[0];
//    talktime=xmlreq.responseText.split('timestamp="')[1].split('"')[0];
    talksum=talksum.split('<').join('&lt;').split('>').join('&gt;').split(' ').join('_');
    talksum=talksum.split('/* ')[1].split(' */')[0];
    talkpage=talkpage.split('<').join('&lt;').split('>').join('&gt;');
    talkuser=talkuser.split('<').join('&lt;').split('>').join('&gt;');
//    talktime=talktime.split('<').join('&lt;').split('>').join('&gt;');
    if(talkrev!=talkrevold) 
      document.getElementById('contentSub').innerHTML+='<div class="usermessage">'+
      '사용자 ['+talkuser+']님이 ['+talksum+']에 토론 남김.'+
      '(<a href="/w/index.php?title='+talkpage+'&diff=cur">바뀐내용</a>) '+
      '(<a href="/wiki/'+talkpage+'#'+talksum+'">바로가기</a>)</div>';
  }
}

/* ********** 페이지 열릴때 실행되는 것들 ********** */
$(function() {
/* Find the top item in the watchlist, and its edit summary. We only need one item, so
set the limit to 1 to ease the load on the server. */
/* 주시목록 변경 확인 */
wmwpajax.download({'http://ko.wikipedia.org/w/api.php?action=query&list=watchlist&wllimit=1&'+
'wldir=older&format=xml&wlprop=comment|ids|title|user', onSuccess: wmWatchEditFound});

/* 사용자토론 변경 확인 */
wmwpajax.download({url:'http://ko.wikipedia.org/w/api.php?action=query&prop=revisions&titles='+
encodeURIComponent(viewpage)+
'&rvlimit=1&rvdir=older&format=xml&rvprop=comment|ids|user|timestamp', onSuccess: wmTalkEditFound});

/* 상단 바로가기 생성 (오류로 인해 실행 막아둠)
document.write('<div class="metadata" style="background:transparent; float:left; position:absolute; z-index:auto; left:210px; top:21px;">
<p><b>바로가기 (<a href="/wiki/%ED%8A%B9%EC%88%98%EA%B8%B0%EB%8A%A5:%EC%B5%9C%EA%B7%BC%EB%B0%94%EB%80%9C" title="특수기능:최근바뀜">최근바뀜</a> - <a href="/wiki/%EC%9C%84%ED%82%A4%EB%B0%B1%EA%B3%BC:%EC%A7%88%EB%AC%B8%EB%B0%A9" title="위키백과:질문방">질문방</a> - <a href="/wiki/%EC%9C%84%ED%82%A4%EB%B0%B1%EA%B3%BC:%EC%82%AC%EB%9E%91%EB%B0%A9" title="위키백과:사랑방">사랑방</a> - <a href="/wiki/%ED%8A%B9%EC%88%98%EA%B8%B0%EB%8A%A5:%ED%8C%8C%EC%9D%BC" title="특수기능:파일">파일목록</a> - <a href="/wiki/%ED%8A%B9%EC%88%98%EA%B8%B0%EB%8A%A5:%EC%A0%91%EB%91%90%EC%96%B4%EC%B0%BE%EA%B8%B0/%EC%82%AC%EC%9A%A9%EC%9E%90:Pocket" title="특수기능:접두어찾기/사용자:Pocket">하부문서목록</a>)</b></p>
</div>
');
*/

});
// </nowiki></pre>