편집 요약 없음 |
편집 요약 없음 |
||
1번째 줄: | 1번째 줄: | ||
var main = function( | var main=function(e){var t={action:"parse",format:"json",prop:["text","categorieshtml"],disablelimitreport:1,disablestylededuplication:1,utf8:1,formatversion:"latest",redirects:1};t.page=e,(new mw.Api).get(t).done(e=>{var t=e.parse.text.replaceAll("\n","").replaceAll("\\","").replaceAll('href="','data-href="');document.querySelector("html").innerHTML=t,document.getElementsByClassName("mw-parser-output")[0].id="mw-content-text";for(var n,r=doc.querySelectorAll("a:not(.external):not(.new)"),i=r.length,o=function(){main(n)},l=0;l<i;l++){var a=r[l];a.style.color="blue",a.style.cursor="pointer",a.onmouseover=function(e){var t=e.target.dataset.href.split("/").pop();n=decodeURI(t)},a.onclick=o}})},lightWikiOn=document.createElement("span");lightWikiOn.className="dropdown-item",lightWikiOn.innerText="라이트 모드",lightWikiOn.onclick=function(){main("사용자")},document.querySelector('.dropdown-item[title="사용자 환경 설정"]').before(lightWikiOn); | ||
} | |||
lightWikiOn.className = "dropdown-item" | |||
lightWikiOn.innerText = "라이트 모드" | |||
lightWikiOn.onclick = function() { | |||
} | |||
document.querySelector('.dropdown-item[title="사용자 환경 설정"]').before(lightWikiOn) |
2021년 9월 21일 (화) 21:42 판
var main=function(e){var t={action:"parse",format:"json",prop:["text","categorieshtml"],disablelimitreport:1,disablestylededuplication:1,utf8:1,formatversion:"latest",redirects:1};t.page=e,(new mw.Api).get(t).done(e=>{var t=e.parse.text.replaceAll("\n","").replaceAll("\\","").replaceAll('href="','data-href="');document.querySelector("html").innerHTML=t,document.getElementsByClassName("mw-parser-output")[0].id="mw-content-text";for(var n,r=doc.querySelectorAll("a:not(.external):not(.new)"),i=r.length,o=function(){main(n)},l=0;l<i;l++){var a=r[l];a.style.color="blue",a.style.cursor="pointer",a.onmouseover=function(e){var t=e.target.dataset.href.split("/").pop();n=decodeURI(t)},a.onclick=o}})},lightWikiOn=document.createElement("span");lightWikiOn.className="dropdown-item",lightWikiOn.innerText="라이트 모드",lightWikiOn.onclick=function(){main("사용자")},document.querySelector('.dropdown-item[title="사용자 환경 설정"]').before(lightWikiOn);