사용자:Bd3076/common.js: 두 판 사이의 차이

리버티게임, 모두가 만들어가는 자유로운 게임
백괴게임>Bd3076
편집 요약 없음
백괴게임>Bd3076
(내용을 "console.log(mw.config.get('wgPageName').substr(0, 11)); if(mw.config.get('wgPageName').substr(0, 11) == "특수:콘텐츠모델바꾸기"){ var url = new URL(window.l..."(으)로 바꿈)
5번째 줄: 5번째 줄:
var mode = url.searchParams.get('mode');
var mode = url.searchParams.get('mode');
if(mode == 'usingPluginX'){
if(mode == 'usingPluginX'){
document.getElementById('mw-content-text').innerHTML = '<div id="mw-content-text"><div id="doNotDisplay"><div class="mw-htmlform-ooui-wrapper oo-ui-layout oo-ui-panelLayout"><form action="/wiki/%ED%8A%B9%EC%88%98:%EC%BD%98%ED%85%90%EC%B8%A0%EB%AA%A8%EB%8D%B8%EB%B0%94%EA%BE%B8%EA%B8%B0/%EC%82%AC%EC%9A%A9%EC%9E%90:Bd3076/%ED%94%8C%EB%9F%AC%EA%B7%B8%EC%9D%B8X%ED%85%8C%EC%8A%A4%ED%8A%B82" method="post" enctype="application/x-www-form-urlencoded" class="mw-htmlform mw-htmlform-ooui oo-ui-layout oo-ui-formLayout"><div class="mw-htmlform-field-HTMLTitleTextField mw-htmlform-field-autoinfuse oo-ui-layout oo-ui-labelElement oo-ui-fieldLayout oo-ui-fieldLayout-align-top" id="ooui-4" data-ooui=""><div class="oo-ui-fieldLayout-body"><span class="oo-ui-fieldLayout-header"><label class="oo-ui-labelElement-label" for="ooui-1">문서 제목</label></span><div class="oo-ui-fieldLayout-field"><div id="mw-input-pagetitle" class="oo-ui-widget oo-ui-widget-enabled oo-ui-inputWidget oo-ui-textInputWidget oo-ui-textInputWidget-type-text mw-widget-titleWidget oo-ui-lookupElement mw-widget-titleInputWidget" aria-disabled="false" data-ooui=""><input type="text" tabindex="0" aria-disabled="false" name="pagetitle" value="사용자:Bd3076/플러그인X테스트2" readonly="" maxlength="255" id="ooui-1" class="oo-ui-inputWidget-input webfonts-changed" autocomplete="off" role="combobox" aria-owns="oojsui-1" aria-autocomplete="list"><span class="oo-ui-iconElement-icon"></span><span class="oo-ui-indicatorElement-indicator"></span></div></div></div></div><div class="mw-htmlform-field-HTMLSelectField mw-htmlform-field-autoinfuse oo-ui-layout oo-ui-labelElement oo-ui-fieldLayout oo-ui-fieldLayout-align-top" id="ooui-5" data-ooui=""><div class="oo-ui-fieldLayout-body"><span class="oo-ui-fieldLayout-header"><label class="oo-ui-labelElement-label">새 콘텐츠 모델</label></span><div class="oo-ui-fieldLayout-field"><div id="mw-input-model" class="oo-ui-widget oo-ui-widget-enabled oo-ui-inputWidget oo-ui-dropdownInputWidget" aria-disabled="false" data-ooui=""><select name="model" id="ooui-2" class="oo-ui-inputWidget-input oo-ui-indicator-down"><option value="javascript">자바스크립트</option><option value="json">JSON</option><option value="css">CSS</option><option value="text">일반 텍스트</option></select><div class="oo-ui-widget oo-ui-widget-enabled oo-ui-indicatorElement oo-ui-dropdownWidget oo-ui-labelElement" aria-disabled="false"><span tabindex="0" aria-disabled="false" class="oo-ui-dropdownWidget-handle" role="combobox" aria-owns="oojsui-2" aria-autocomplete="list"><span class="oo-ui-iconElement-icon"></span><span class="oo-ui-labelElement-label">자바스크립트</span><span class="oo-ui-indicatorElement-indicator oo-ui-indicator-down"></span></span></div></div></div></div></div><div id="ooui-6" class="mw-htmlform-field-HTMLTextField  oo-ui-layout oo-ui-labelElement oo-ui-fieldLayout oo-ui-fieldLayout-align-top" data-ooui="{&quot;_&quot;:&quot;mw.htmlform.FieldLayout&quot;,&quot;fieldWidget&quot;:{&quot;tag&quot;:&quot;mw-input-reason&quot;},&quot;align&quot;:&quot;top&quot;,&quot;errors&quot;:[],&quot;notices&quot;:[],&quot;$overlay&quot;:true,&quot;label&quot;:{&quot;html&quot;:&quot;\uc774\uc720:&quot;},&quot;classes&quot;:[&quot;mw-htmlform-field-HTMLTextField&quot;,&quot;&quot;]}"><div class="oo-ui-fieldLayout-body"><span class="oo-ui-fieldLayout-header"><label for="ooui-3" class="oo-ui-labelElement-label">이유:</label></span><div class="oo-ui-fieldLayout-field"><div id="mw-input-reason" aria-disabled="false" class="oo-ui-widget oo-ui-widget-enabled oo-ui-inputWidget oo-ui-textInputWidget oo-ui-textInputWidget-type-text oo-ui-textInputWidget-php" data-ooui="{&quot;_&quot;:&quot;OO.ui.TextInputWidget&quot;,&quot;name&quot;:&quot;reason&quot;,&quot;inputId&quot;:&quot;ooui-3&quot;}"><input type="text" tabindex="0" aria-disabled="false" name="reason" value="" id="ooui-3" class="oo-ui-inputWidget-input webfonts-changed"><span class="oo-ui-iconElement-icon"></span><span class="oo-ui-indicatorElement-indicator"></span></div></div></div></div></div><input id="wpEditToken" type="hidden" value="c96f8630e8b1d58d9712edd101385a375be570bd+\" name="wpEditToken" class="webfonts-changed"><input type="hidden" value="특수:콘텐츠모델바꾸기/사용자:Bd3076/플러그인X테스트2" name="title" class="webfonts-changed"><input name="redirectparams" type="hidden" value="action=edit&amp;mode=usingPluginX" class="webfonts-changed"><div class="mw-htmlform-submit-buttons"><span aria-disabled="false" id="ooui-7" class="mw-htmlform-submit oo-ui-widget oo-ui-widget-enabled oo-ui-flaggedElement-primary oo-ui-flaggedElement-progressive oo-ui-inputWidget oo-ui-buttonElement oo-ui-buttonElement-framed oo-ui-labelElement oo-ui-buttonInputWidget" data-ooui="{&quot;_&quot;:&quot;OO.ui.ButtonInputWidget&quot;,&quot;type&quot;:&quot;submit&quot;,&quot;value&quot;:&quot;\ubc14\uafb8\uae30&quot;,&quot;flags&quot;:[&quot;primary&quot;,&quot;progressive&quot;],&quot;label&quot;:&quot;\ubc14\uafb8\uae30&quot;,&quot;classes&quot;:[&quot;mw-htmlform-submit&quot;]}"><button type="submit" tabindex="0" aria-disabled="false" value="플러그인 생성" class="oo-ui-inputWidget-input oo-ui-buttonElement-button webfonts-changed"><span class="oo-ui-iconElement-icon oo-ui-image-invert"></span><span class="oo-ui-labelElement-label">바꾸기</span><span class="oo-ui-indicatorElement-indicator oo-ui-image-invert"></span></button></span></div></form></div><h2>콘텐츠 모델 변경 기록</h2><div class="mw-warning-logempty">일치하는 항목이 없습니다.</div></div>';
}
}
}
}

2018년 11월 9일 (금) 20:38 판

console.log(mw.config.get('wgPageName').substr(0, 11));

if(mw.config.get('wgPageName').substr(0, 11) == "특수:콘텐츠모델바꾸기"){
	var url = new URL(window.location);
	var mode = url.searchParams.get('mode');
	if(mode == 'usingPluginX'){
		
	}
}