Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

change position of return (#1374)

Cette révision appartient à :
kilo 2017-08-17 03:35:18 +02:00 révisé par ewhal
Parent 2052f2370c
révision 4f00f74859

Voir le fichier

@ -6,14 +6,17 @@
function switchThemes() {
var themeName = document.getElementById("theme-selector").value
var head = document.getElementsByTagName("head")[0]
if (themeName === "") {
return
}
// Remove the theme in place, it fails if one isn't set
try {
head.removeChild(document.getElementById("theme"))
} catch (err) {}
// Don't add a node if we don't want extra styling
if (themeName === "") {
return
}
// Create the new one and put it back
var newTheme = document.createElement("link")
newTheme.setAttribute("rel", "stylesheet")