문서 편집 권한이 없습니다. 다음 이유를 확인해주세요: 여기에는 다른 사용자의 개인 설정이 포함되어 있기 때문에 이 자바스크립트 문서를 편집할 수 없습니다. 문서의 원본을 보거나 복사할 수 있습니다. /** * mediawiki.api easifier * for Wiki Site Script */ /** * @typedef {{ any : * }} dict */ /** * @constructor * @param {string} title */ function Page(title) { /** * @type {string} */ this.title = title; /** * set title * @param {string} title */ this.SetTitle = function (title) { this.title = title; }; var mainParam = { format: "json", formatversion: "latest", utf8: "1" }; /** * @param {dict} params * @returns {dict} */ this.MakeParam = function (params) { return Object.assign({}, mainParam, params); }; /** * @param {string} to * @param {string} reason */ this.Moveto = function (to, reason) { if (this.title === null) return; return new mw.Api().postWithToken('csrf', this.MakeParam({ "action": "move", "from": this.title, "to": to, "reason": reason, "movetalk": 1, "noredirect": 1, "movesubpages": 1 })).done(data => { mw.notify('이동 완료!').done(function() { location.href = mw.config.values.wgArticlePath.replace('$1', to)}); }).fail(data => { mw.notify('이동 실패'); console.log(data); }); }; } 이 문서에서 사용한 틀: 틀:Any : * (편집) 사용자:하늘/page.js 문서로 돌아갑니다.