diff --git a/apps/i2psnark/resources/js/configui.js b/apps/i2psnark/resources/js/configui.js index 6e0fb776995305b5b4c8e6211dc43eec5be19fac..336068313fd11f770d5a14e42fca2823b0b4d2e6 100644 --- a/apps/i2psnark/resources/js/configui.js +++ b/apps/i2psnark/resources/js/configui.js @@ -5,6 +5,7 @@ // a public domain is not usable. var oldTheme = "ubergine"; +var change = false; function swapStyleSheet(theme) { // https://stackoverflow.com/questions/14292997/changing-style-sheet-javascript @@ -18,7 +19,12 @@ function initThemeSwitcher() { } oldtheme = theme.value; theme.onclick = function() { - swapStyleSheet(theme.value); + if (change) { + swapStyleSheet(theme.value); + } else { + // skip the first click to avoid the flash + change = true; + } } }