12,662
edits"Legacy Content" -> "Legacy content"
Crashaholic (talk | contribs) (hmm) |
("Legacy Content" -> "Legacy content") Tag: content model change |
||
(11 intermediate revisions by one other user not shown) | |||
Line 16: | Line 16: | ||
localStorage.setItem(key, 'dark'); | localStorage.setItem(key, 'dark'); | ||
} | } | ||
if (lightmode == 'dark') currentMode = 0; | |||
if (lightmode == 'light') currentMode = 1; | |||
function switchTheme() { | function switchTheme() { | ||
Line 36: | Line 39: | ||
var foo = document.querySelector('.vector-menu-content-list'); | var foo = document.querySelector('.vector-menu-content-list'); | ||
foo.prepend(node1); | foo.prepend(node1); | ||
node1.id = "pt-mode"; //adding to literally just make it look similar to the other options LMAO | |||
node1.appendChild(node2); | node1.appendChild(node2); | ||
node2.setAttribute('onclick', 'switchTheme()'); | node2.setAttribute('onclick', 'switchTheme()'); | ||
if ( | if (!currentMode) | ||
node2.innerText = "Change to Light Theme"; | node2.innerText = "Change to Light Theme"; | ||
else if ( | else if (currentMode) | ||
node2.innerText = "Change to Dark Theme" | node2.innerText = "Change to Dark Theme"; | ||
node1.classList += "mw-list-item"; | node1.classList += "mw-list-item"; | ||
} | } | ||
Line 85: | Line 89: | ||
set_var("--btn-active-bdr", "rgb(61, 43, 8)"); | set_var("--btn-active-bdr", "rgb(61, 43, 8)"); | ||
set_var("--btn-active-fg", "rgb(44, 34, 16)"); | set_var("--btn-active-fg", "rgb(44, 34, 16)"); | ||
$('.theme-dark-grey').addClass('theme-bg3-light'); // lazy catchall that | |||
// doesnt actually catch all | |||
// == Targetted items == | |||
$('.bg3wiki-tooltip-box').addClass('theme-bg3-light'); // the rounded boxes | |||
$('#bg3wiki-legacy-content-notice').addClass('theme-bg3-light'); // Legacy content Template | |||
$('.bg3wiki-blockquote-text').addClass('theme-bg3-light'); // Description Template | |||
$('.mw-list-item.selected').addClass('theme-bg3-light'); // the tabs at the top | |||
// == For images that are pure white (thanks larian) | |||
var a = document.querySelectorAll('img') | |||
a.forEach(function(e) { | |||
e.style.filter = "drop-shadow(0 0 5px #555)"; | |||
}); | |||
} | } |