From d854378da5648b14c5fb323f254a2b373eb705bb Mon Sep 17 00:00:00 2001 From: Renard Date: Sat, 30 Mar 2019 13:30:18 -0300 Subject: Selector de CSS Fix 1 Fix 2 Conchetumadresan Cleanup ahorasi Ajustes en selector y CSS Ajustes CSS para Selector de estilo Fix gif background Arreglos finales --- static/js/weabotxt.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'static/js') diff --git a/static/js/weabotxt.js b/static/js/weabotxt.js index 37668d8..91e2ab0 100644 --- a/static/js/weabotxt.js +++ b/static/js/weabotxt.js @@ -1,5 +1,7 @@ var style_cookie = "weabot_style_txt"; -if(style_cookie && localStorage.hasOwnProperty(style_cookie)) { set_stylesheet(localStorage.getItem(style_cookie)); } +if(style_cookie && localStorage.hasOwnProperty(style_cookie)) { + set_stylesheet(localStorage.getItem(style_cookie)); +} var hiddenposts = Array(); @@ -240,6 +242,11 @@ function togglepost(e) { localStorage.setItem("hiddenposts", hiddenposts.join("!")); } +function applyTheme(){ + var newTheme = document.getElementById("themeSelector").value; + set_stylesheet(newTheme); +} + document.addEventListener("DOMContentLoaded", function() { if (localStorage.hasOwnProperty("weabot")) weabot = JSON.parse(localStorage.getItem("weabot")); else weabot = {"name":null,"email":null,"password":null}; @@ -256,16 +263,10 @@ document.addEventListener("DOMContentLoaded", function() { var forms = document.getElementsByTagName("form"); for(var i=0;i