문서 편집 권한이 없습니다. 다음 이유를 확인해주세요: 여기에는 다른 사용자의 개인 설정이 포함되어 있기 때문에 이 자바스크립트 문서를 편집할 수 없습니다. 문서의 원본을 보거나 복사할 수 있습니다. /* 한국어 위키백과 미디어위키:Gadget-editsummary.js를 약간 수정함 */ function esEditSummary() { if (typeof esEditSummaries === 'undefined') return; var wgAction = mw.config.get('wgAction'); if (wgAction == 'edit' || wgAction == 'submit') { var wpSummary = document.getElementById('wpSummary'); if (!wpSummary || (wpSummary.form.wpSection && wpSummary.form.wpSection.value == 'new')) return; wpSummaryButtons = new OO.ui.ButtonGroupWidget({id: "wpSummaryButtons"}); wpSummaryButtons.$element.css({"margin-top": "1em"}); $("#wpSummaryLabel .oo-ui-fieldLayout-header").after(wpSummaryButtons.$element); let ButtonElements = []; for (let id = 0; id < esEditSummaries.length; id++) { var btnElement = new OO.ui.ButtonWidget({ data: 1, label: esEditSummaries[id][0], title: esEditSummaries[id][2] }).on('click', () => { esInsertSummary (esEditSummaries[id][1], esEditSummaries[id][3], esEditSummaries[id][4]); }); ButtonElements.push(btnElement); } wpSummaryButtons.addItems(ButtonElements); } } function esInsertSummary(text, isMinor, clear) { var wpSummary = document.getElementById('wpSummary'); if (isMinor !== undefined) { $('#wpMinoredit').prop('checked', isMinor, clear); } if (clear == 1) { wpSummary.value = text; return; } if (wpSummary.value.indexOf(text) != -1) return; if (wpSummary.value.match(/[^,; \/]$/)) wpSummary.value += ','; if (wpSummary.value.match(/[^ ]$/)) wpSummary.value += ' '; wpSummary.value += text; } jQuery(document).ready(esEditSummary); esEditSummaries = [ /* ['버튼 이름', '입력될 편집 요약', '툴팁으로 뜨는 설명(생략 가능)', '사소한 편집 여부(0/1 혹은 true/false, 생략 가능)', '상용구 넣기 전에 요약 지우기(0/1 혹은 true/false, 생략 가능)'] 위와 같은 형식으로 새로운 버튼을 추가할 수 있습니다. 마지막 줄을 제외한 줄 끝에 쉼표가 들어가 있는지 확인해 주세요. */ ['갱신 ', '문서 정보 갱신', '오래된 문서 정보를 갱신', 0, 1], ['넘겨주기 ', '넘겨주기', '넘겨주기 생성', 1, 1], ['동음이의 ', '동음이의어 문서', '동음이의 문서를 작성', 0, 1], ['분류 ', '분류 추가', '분류 추가', 1, 1], ['삭제 신청 ', '문서 삭제 신청', '삭제 신청 틀', 1, 1], ['오타 ', '오타 수정', '문서에서 오타를 정정', 1, 1], ['답변 ', '의견에 답변', '질문이나 의견에 답변', 1, 0], ['분기 ', '문단 새 문서로 분기 - ', '다른 문서와의 병합을 제안하거나 실행', 0, 1], ['디자인 ', '디자인 수정', '디자인 개선', 0, 1], ['테스트', '테스트', '테스트', 0, 1], ['가독성', '가독성 개선', '가독성 개선', 0, 1] ]; 사용자:하늘/addbutton.js 문서로 돌아갑니다.