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

/*
== [[위키백과:도구/편집요약 상용구]] ==
*/
esEditSummaries = new Array(
/*
new Array('버튼 이름', '입력될 편집 요약', '툴팁으로 뜨는 설명(생략 가능)', '사소한 편집 여부(0/1 혹은 true/false, 생략 가능)', '상용구 넣기 전에 요약 지우기(0/1 혹은 true/false, 생략 가능)')
위와 같은 형식으로 새로운 버튼을 추가할 수 있습니다.
마지막 줄을 제외한 줄 끝에 쉼표가 들어가 있는지 확인해 주세요.
*/
	new Array('띄어','띄어쓰기 고침.','', 0, 0),
	new Array('링추','+[[]], 링크 추가.','', 0, 0),
	new Array('링고','+[[]], 링크 고침.','', 0, 0),
	new Array('공줄','{{[[틀:위키공용분류-줄|위키공용분류-줄]]}} 틀을 추가.','', 0, 1),
	new Array('좌표','{{[[틀:좌표|좌표]]}} 틀을 추가.','', 0, 1),
	new Array('전거','{{[[틀:전거 통제|전거 통제]]}} 틀을 추가.','', 0, 1),
	new Array('분류군','{{[[틀:분류군 식별자|분류군 식별자]]}} 틀을 추가.','', 0, 1),
	new Array('언어링크ko','-{{[[틀:언어링크|언어링크]]|ko}}, 틀을 지움.','', 0, 0),
	new Array('각주','{{[[틀:각주|각주]]}} 틀로 바꿈.','', 0, 0),
	new Array('YMD', '인용 틀의 날짜 꼴을 \'YYYY-MM-DD\' 꼴로 고침. =인용 오류 고침.', '', 0, 1),
	new Array('X','','편집 요약 비우기', 0, 1)
);
/* 2020-02-29 입력될 편집 요약 안에 아포스트로피를 입력하고 싶을 때, 바로 앞에 역슬래시를 추가 */


/*
중복된 인수 찾기
*/
importScript('사용자:Namoroka/findargdups.js'); // [[사용자:Namoroka/중복된 인수 찾기]] +2017-10-30


/*

* 롤배커들을 위한 Gadget Script v0.1
** by [[사용자:Devunt]]

*/

function addExtRbLink($container) {
	var wgCanonicalSpecialPageName  = mw.config.get('wgCanonicalSpecialPageName');
	var wgAction  = mw.config.get('wgAction');
    var $rbnode = $([]), index = {};
    if (typeof rollbackLinksDisable == 'object' && rollbackLinksDisable instanceof Array)
        for (var i = 0; i < rollbackLinksDisable.length; i++)
            index[rollbackLinksDisable[i]] = true;
    if (
    	!('user' in index) && wgCanonicalSpecialPageName == "Contributions" ||
        !('recent' in index) && wgCanonicalSpecialPageName == "Recentchanges" ||
        !('watchlist' in index) && wgCanonicalSpecialPageName == "Watchlist" ||
        !('history' in index) && wgAction == "history" ||
        !('diff' in index) && (diffnode = document.getElementById("mw-diff-ntitle2"))
    ) {
        $rbnode = $container.find( 'span.mw-rollback-link' );
    }
	$rbnode.each( function () { addExtendedRollbackLink( this ); } );
};
 
function confirmRollback() {
    var url = this.href;
    var user = url.match(/[?&]from=([^&]*)/);
    if (!user) return;
    user = decodeURIComponent(user[1].replace(/\+/g, " "));
    var summary = prompt("추가할 편집 요약을 입력하세요\n\n$user 는 편집이 되돌려질 사용자 이름으로 치환됩니다.",
                         rollbackSummaryDefault);
    if (summary == undefined)
        return false;
    else if (summary == "")
        return true;
    this.href += "&summary=" + '[[Special:Contributions/$2|$2]]([[User talk:$2|토론]])의 편집을 전부 되돌림: '.replace(/\$2/g, user) + encodeURIComponent(summary.replace(/\$user/g, user));
    return true;
};

function rollbackAsBot() {
    this.href += "&bot=1";
    return true;
}
 
function addExtendedRollbackLink(rbnode) {
    var rblink = rbnode.getElementsByTagName("a")[0];
    var alink = rblink.cloneNode(true);
    alink.className = "";
    alink.firstChild.nodeValue = "C";
    alink.onclick = confirmRollback;
    rbnode.insertBefore(alink, rblink.nextSibling);
    rbnode.insertBefore(document.createTextNode("|"), alink);
    if (userIsInGroup('sysop'))
    {
        var blink = rblink.cloneNode(true);
        blink.className = "";
        blink.firstChild.nodeValue = "B";
        blink.onclick = rollbackAsBot;
        rbnode.insertBefore(blink, alink.nextSibling);
        rbnode.insertBefore(document.createTextNode("|"), blink);
    }
};
if (typeof rollbackLinksDisable == 'undefined')
    rollbackLinksDisable = [];
if (typeof rollbackSummaryDefault == 'undefined')
    rollbackSummaryDefault = "";

mw.hook( 'wikipage.content' ).add(addExtRbLink);

function userIsInGroup (group)
{
	var wgUserGroups = mw.config.get('wgUserGroups');
  if (wgUserGroups) {
    if (!group || group.length == 0) group = '*';
    return wgUserGroups.join (' ').indexOf (group) >= 0;
  }
  return false;
}

/*
== EditTools ==
*/

// 설정
window.charinsertCustom = {
  '즐겨쓰기':'*+_{{위키공용분류-줄}} {{전거+_통제}} – — ― · … ‘+’ “+” 〈+〉 《+》  ° ′ ″ <s>+</s> <u>+</u> <code>+</code> <nowiki>+</nowiki>  <onlyinclude>+</onlyinclude> <includeonly>+</includeonly> <noinclude>+</noinclude>  <!--.+_-->  <span.class="plainlinks">+</span> <span style="">+</span> <small>+</small>' ,
};



/*
작업장 링크로 고침 2020-01-09. 메뉴추가 2020-01-01
*/
$(".body ul:first").append('<li id="n-portal2"><a href="/wiki/%EC%82%AC%EC%9A%A9%EC%9E%90:%EA%B8%B0%EB%A1%9D/2020%EB%85%84/%EC%9E%91%EC%97%85%EC%9E%A5" title="2020년 작업장">작업장</a></li>');

$(".body ul:first").append('<li id="n-portal2"><span><a href="https://ko.wikipedia.org/w/index.php?title=%EC%82%AC%EC%9A%A9%EC%9E%90:%EB%A9%94%EC%9D%B4/common.js&action=edit" title="common.js 수정">■</a></span> <span id="bottom-button">▼</span></li>');
$("#bottom-button").click(function(){
	$('html, body').scrollTop( $(document).height() );
});



/* 2020-01-19 추가.
환경설정>소도구>스크롤업 버튼
스크롤업 버튼: 현재 페이지의 최상단으로 스크롤하는 버튼을 추가합니다.
※미디어위키:Gadget-scrollUpButton.js */
/* scrollUpButton
* Add a button to scroll up to the top of the current page.
* @rev 3 (2019-28-07)
* @author Kwj2772
* @contributor Perhelion
* No internationalisation required
* [kowiki] Fixed an issue with help-panel-button ([[ko:User:ykhwong]])
* <nowiki>
*/
/* global $:false */
/* upload.wikimedia.org/wikipedia/commons/thumb/7/76/MediaWiki_Vector_skin_up_arrow.svg/64px-MediaWiki_Vector_skin_up_arrow.svg.png */
$(function () {
'use strict';

var $icon = '//upload.wikimedia.org/wikipedia/commons/thumb/c/ce/Open_Iconic_arrow_circle_top.svg/30px-Open_Iconic_arrow_circle_top.svg.png';
var helpPanelButtonFound = false;

if (!document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#Image', '1.1'))
	$icon = '//upload.wikimedia.org/wikipedia/commons/thumb/c/ce/Open_Iconic_arrow_circle_top.svg/30px-Open_Iconic_arrow_circle_top.svg.png';

$icon = $('<img>', {
	src: $icon,
	id: 'scrollUpButton'
}).css({
		position: 'fixed',
		bottom: '140px',
		right: '18px',
		opacity: 0.7,
		cursor: 'pointer',
		display: 'none'
	}).on('click', function () {
		// Move to the top of the page
		$('html, body').animate({ scrollTop: 0 }, 660);
	}).on('mouseenter mouseleave', function (e) {
		this.style.opacity = e.type === 'mouseenter' ? 1 : 0.7;
	}).appendTo('body');

$(window).on('scroll', function () {
	if (!helpPanelButtonFound && $("#mw-ge-help-panel-cta-button").length > 0) {
		$("img#scrollUpButton").css({
			bottom: '75px'
		});
		helpPanelButtonFound = true;
	}

	// Fade out if you reach the top of the page
	if ($(this).scrollTop() > 60) $icon.fadeIn('slow');
	else $icon.fadeOut('slow');
});

}());



/* 스크롤다운. 스크롤업 버튼 소스 일부를 수정. 바로 위쪽 참고. */
/* 2020-01-25 추가.
※미디어위키:Gadget-scrollUpButton.js */
/* upload.wikimedia.org/wikipedia/commons/thumb/f/f1/MediaWiki_Vector_skin_action_arrow.svg/64px-MediaWiki_Vector_skin_action_arrow.svg.png */

$(function () {
'use strict';

var $icon = '//upload.wikimedia.org/wikipedia/commons/thumb/9/98/Open_Iconic_arrow_circle_bottom.svg/30px-Open_Iconic_arrow_circle_bottom.svg.png';
var helpPanelButtonFound = false;

if (!document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#Image', '1.1'))
	$icon = '//upload.wikimedia.org/wikipedia/commons/thumb/9/98/Open_Iconic_arrow_circle_bottom.svg/30px-Open_Iconic_arrow_circle_bottom.svg.png';

$icon = $('<img>', {
	src: $icon,
	id: 'scrollUpButton'
}).css({
		position: 'fixed',
		bottom: '100px',
		right: '18px',
		opacity: 0.7,
		cursor: 'pointer',
		display: 'none'
	}).on('click', function () {
		// Move to the top of the page

		$('html, body').scrollTop( $(document).height() );
		// $('html, body').animate({ scrollTop: 0 }, 660);
	}).on('mouseenter mouseleave', function (e) {
		this.style.opacity = e.type === 'mouseenter' ? 1 : 0.7;
	}).appendTo('body');

$(window).on('scroll', function () {
	if (!helpPanelButtonFound && $("#mw-ge-help-panel-cta-button").length > 0) {
		$("img#scrollUpButton").css({
			bottom: '75px'
		});
		helpPanelButtonFound = true;
	}

	// Fade out if you reach the top of the page
	if ($(this).scrollTop() > 60) $icon.fadeIn('slow');
	else $icon.fadeOut('slow');
});

}());


/*왼쪽*/
/* 2022-05-28 추가.
환경설정>소도구>스크롤업 버튼
스크롤업 버튼: 현재 페이지의 최상단으로 스크롤하는 버튼을 추가합니다.
※미디어위키:Gadget-scrollUpButton.js */
/* scrollUpButton
* Add a button to scroll up to the top of the current page.
* @rev 3 (2019-28-07)
* @author Kwj2772
* @contributor Perhelion
* No internationalisation required
* [kowiki] Fixed an issue with help-panel-button ([[ko:User:ykhwong]])
* <nowiki>
*/
/* global $:false */
/* upload.wikimedia.org/wikipedia/commons/thumb/7/76/MediaWiki_Vector_skin_up_arrow.svg/64px-MediaWiki_Vector_skin_up_arrow.svg.png */
$(function () {
'use strict';

var $icon = '//upload.wikimedia.org/wikipedia/commons/thumb/c/ce/Open_Iconic_arrow_circle_top.svg/30px-Open_Iconic_arrow_circle_top.svg.png';
var helpPanelButtonFound = false;

if (!document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#Image', '1.1'))
	$icon = '//upload.wikimedia.org/wikipedia/commons/thumb/c/ce/Open_Iconic_arrow_circle_top.svg/30px-Open_Iconic_arrow_circle_top.svg.png';

$icon = $('<img>', {
	src: $icon,
	id: 'scrollUpButton'
}).css({
		position: 'fixed',
		bottom: '50px',
		left: '18px',
		opacity: 0.7,
		cursor: 'pointer',
		display: 'none'
	}).on('click', function () {
		// Move to the top of the page
		$('html, body').animate({ scrollTop: 0 }, 660);
	}).on('mouseenter mouseleave', function (e) {
		this.style.opacity = e.type === 'mouseenter' ? 1 : 0.7;
	}).appendTo('body');

$(window).on('scroll', function () {
	if (!helpPanelButtonFound && $("#mw-ge-help-panel-cta-button").length > 0) {
		$("img#scrollUpButton").css({
			bottom: '75px'
		});
		helpPanelButtonFound = true;
	}

	// Fade out if you reach the top of the page
	if ($(this).scrollTop() > 60) $icon.fadeIn('slow');
	else $icon.fadeOut('slow');
});

}());



/* 스크롤다운. 스크롤업 버튼 소스 일부를 수정. 바로 위쪽 참고. */
/* 2022-05-28 추가.
※미디어위키:Gadget-scrollUpButton.js */
/* upload.wikimedia.org/wikipedia/commons/thumb/f/f1/MediaWiki_Vector_skin_action_arrow.svg/64px-MediaWiki_Vector_skin_action_arrow.svg.png */

$(function () {
'use strict';

var $icon = '//upload.wikimedia.org/wikipedia/commons/thumb/9/98/Open_Iconic_arrow_circle_bottom.svg/30px-Open_Iconic_arrow_circle_bottom.svg.png';
var helpPanelButtonFound = false;

if (!document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#Image', '1.1'))
	$icon = '//upload.wikimedia.org/wikipedia/commons/thumb/9/98/Open_Iconic_arrow_circle_bottom.svg/30px-Open_Iconic_arrow_circle_bottom.svg.png';

$icon = $('<img>', {
	src: $icon,
	id: 'scrollUpButton'
}).css({
		position: 'fixed',
		bottom: '10px',
		left: '18px',
		opacity: 0.7,
		cursor: 'pointer',
		display: 'none'
	}).on('click', function () {
		// Move to the top of the page

		$('html, body').scrollTop( $(document).height() );
		// $('html, body').animate({ scrollTop: 0 }, 660);
	}).on('mouseenter mouseleave', function (e) {
		this.style.opacity = e.type === 'mouseenter' ? 1 : 0.7;
	}).appendTo('body');

$(window).on('scroll', function () {
	if (!helpPanelButtonFound && $("#mw-ge-help-panel-cta-button").length > 0) {
		$("img#scrollUpButton").css({
			bottom: '75px'
		});
		helpPanelButtonFound = true;
	}

	// Fade out if you reach the top of the page
	if ($(this).scrollTop() > 60) $icon.fadeIn('slow');
	else $icon.fadeOut('slow');
});

}());