aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rw-r--r--static/css/ib.css1
-rw-r--r--static/js/weabot.js19
2 files changed, 11 insertions, 9 deletions
diff --git a/static/css/ib.css b/static/css/ib.css
index 1609e4d..55e8012 100644
--- a/static/css/ib.css
+++ b/static/css/ib.css
@@ -52,6 +52,7 @@ input[type="text"],input[type="password"],textarea{background:#FFF;border:1px in
.footer{clear:both;margin-top:8px;text-align:center}
.managertable th,.managertable td{padding:3px}
#q-p{position:absolute;border:1px dotted gray}
+.selector{font-size: 10pt}
@media(max-width:900px){.thread{margin-right:0}}
@media(max-width:720px){
body{font-size:15px;padding:4px}
diff --git a/static/js/weabot.js b/static/js/weabot.js
index da0ba83..0f27075 100644
--- a/static/js/weabot.js
+++ b/static/js/weabot.js
@@ -361,6 +361,11 @@ function catHidden() {
lbl.appendChild(shw); lbl.appendChild(document.createTextNode("]"));
}
+function applyTheme(){
+ var newTheme = document.getElementById("styles").value;
+ set_stylesheet(newTheme);
+}
+
document.addEventListener("DOMContentLoaded", function(e) {
checkhighlight();
if (localStorage.hasOwnProperty("weabot")) weabot = JSON.parse(localStorage.getItem("weabot"));
@@ -414,15 +419,11 @@ document.addEventListener("DOMContentLoaded", function(e) {
for(var i=0;i<tts.length;i++) {
tts[i].addEventListener('click', expandimg);
}
- var sss = document.getElementsByClassName("ss");
- for(var i=0;i<sss.length;i++) {
- sss[i].addEventListener('click', function() {
- var cur = document.getElementById("cur_stl");
- set_stylesheet(this.textContent);
- if (cur) cur.removeAttribute("id");
- this.id = "cur_stl";
- });
- if (sss[i].innerText == localStorage.getItem(style_cookie)) sss[i].id = "cur_stl";
+
+ var styleSelect = document.getElementById("styles");
+ if (styleSelect) {
+ styleSelect.addEventListener("change", applyTheme, false);
+ styleSelect.value = localStorage.getItem(style_cookie);
}
if (document.getElementById(board))