문서 편집 권한이 없습니다. 다음 이유를 확인해주세요: 여기에는 다른 사용자의 개인 설정이 포함되어 있기 때문에 이 자바스크립트 문서를 편집할 수 없습니다. 문서의 원본을 보거나 복사할 수 있습니다. let Inputfield = document.querySelector(".mw-wikiEditor-InsertLink-TitleInputField .oo-ui-inputWidget-input"); function getTitle () { fetch(`https://api.allorigins.win/get?url=${encodeURIComponent(Inputfield.value)}`) .then(response => { if (response.ok) return response.json(); throw new Error('Network response was not ok.'); console.log(response); // .match(new RegExp("<title.*?>(.*?)</title>")); document.querySelector(".mw-wikiEditor-InsertLink-LinkTextField .oo-ui-inputWidget-input").value = res }) .then(data => console.log(data.contents)); } var btnElement = new OO.ui.ButtonWidget({ data: 1, label: "자동 입력", title: "" }); btnElement.on('click', getTitle); $(".mw-wikiEditor-InsertLink-LinkTextField .oo-ui-fieldLayout-field").append("<div> </div>"); $(".mw-wikiEditor-InsertLink-LinkTextField .oo-ui-fieldLayout-field").append(btnElement.$element); 사용자:하늘/autoInsertLinkTitle.js 문서로 돌아갑니다.