편집 요약 없음 |
편집 요약 없음 |
||
19번째 줄: | 19번째 줄: | ||
if (localStorage.darkmode == 'false') { | if (localStorage.darkmode == 'false') { | ||
darkmodeSwitch.innerText = ' | darkmodeSwitch.innerText = '라이트모드'; | ||
darkmodeSwitch.onclick = function () { | darkmodeSwitch.onclick = function () { | ||
localStorage.darkmode = true; | localStorage.darkmode = true; | ||
25번째 줄: | 25번째 줄: | ||
document.querySelector('html').className += ' Liberty-dark'; | document.querySelector('html').className += ' Liberty-dark'; | ||
} else { | } else { | ||
darkmodeSwitch.innerText = ' | darkmodeSwitch.innerText = '다크모드'; | ||
darkmodeSwitch.onclick = function () { | darkmodeSwitch.onclick = function () { | ||
localStorage.darkmode = false; | localStorage.darkmode = false; | ||
}; | }; | ||
} | } |
2022년 2월 21일 (월) 21:36 판
$(window).load(function () {
if (document.firstElementChild.className.indexOf('ve-available') !== -1 && location.href.indexOf('veaction') == -1) {
console.log('ve-available');
var editButton = document.querySelector('#ca-edit');
var veditButton = editButton.cloneNode(true);
veditButton.href = veditButton.href.replace('action', 'veaction'),
veditButton.title = '비주얼 에디터로 편집하기',
//veditButton.innerHTML = veditButton.innerHTML.replace('편집', 'VE'),
veditButton.innerHTML = '<i class="fas fa-eye"></i>',
veditButton.accessKey = 'v',
editButton.after(veditButton);
//비주얼 에디터
}
});
var darkmodeSwitch = document.querySelector('.dropdown-divider.view-logout').previousElementSibling.cloneNode();
$('.dropdown-divider.view-logout').before(darkmodeSwitch);
if (localStorage.darkmode == 'false') {
darkmodeSwitch.innerText = '라이트모드';
darkmodeSwitch.onclick = function () {
localStorage.darkmode = true;
};
document.querySelector('html').className += ' Liberty-dark';
} else {
darkmodeSwitch.innerText = '다크모드';
darkmodeSwitch.onclick = function () {
localStorage.darkmode = false;
};
}