사용자:하늘/light.js

< 사용자:하늘
하늘 (토론 | 기여)님의 2021년 9월 21일 (화) 21:42 판

참고: 설정을 저장한 후에 바뀐 점을 확인하기 위해서는 브라우저의 캐시를 새로 고쳐야 합니다.

  • 파이어폭스 / 사파리: Shift 키를 누르면서 새로 고침을 클릭하거나, Ctrl-F5 또는 Ctrl-R을 입력 (Mac에서는 ⌘-R)
  • 구글 크롬: Ctrl-Shift-R키를 입력 (Mac에서는 ⌘-Shift-R)
  • 인터넷 익스플로러 / 엣지: Ctrl 키를 누르면서 새로 고침을 클릭하거나, Ctrl-F5를 입력.
  • 오페라: Ctrl-F5를 입력.
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);