change position of return (#1374)
Cette révision appartient à :
Parent
2052f2370c
révision
4f00f74859
1 fichiers modifiés avec 6 ajouts et 3 suppressions
|
@ -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")
|
||||
|
|
Référencer dans un nouveau ticket