편집 요약 없음 |
편집 요약 없음 |
||
5번째 줄: | 5번째 줄: | ||
window.location.href = window.location.href + '?action=render'; | window.location.href = window.location.href + '?action=render'; | ||
}; | }; | ||
document.querySelector('.dropdown-item[title="사용자 환경 설정"]').before(lightWikiOn); | |||
/*var links = document.getElementsByTagName('a'); | /*var links = document.getElementsByTagName('a'); | ||
var linksSize = links.length; | var linksSize = links.length; |
2021년 9월 22일 (수) 13:16 판
var lightWikiOn = document.createElement('span');
lightWikiOn.className = "dropdown-item";
lightWikiOn.innerText = "라이트 모드";
lightWikiOn.onclick = function() {
window.location.href = window.location.href + '?action=render';
};
document.querySelector('.dropdown-item[title="사용자 환경 설정"]').before(lightWikiOn);
/*var links = document.getElementsByTagName('a');
var linksSize = links.length;
for (var i = 0; i < linksSize; i++) {
var l_link = links[i];
if (l_link.href.includes('action=render') === true || l_link.href.includes('action=edit') === true) {
console.log('render & edit');
} else {
l_link.href = l_link.href + '?action=render';
console.log(l_link.href);
}
}*/