From 7dbd8f3dc62ea8227f3fe3b5729a1812f1abbb0c Mon Sep 17 00:00:00 2001 From: Choom Date: Mon, 9 Jan 2023 20:17:04 -0300 Subject: Achicar AA en móvil --- static/js/weabotxt.js | 60 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 25 deletions(-) (limited to 'static/js/weabotxt.js') diff --git a/static/js/weabotxt.js b/static/js/weabotxt.js index 734a5ae..93850d9 100644 --- a/static/js/weabotxt.js +++ b/static/js/weabotxt.js @@ -234,35 +234,45 @@ document.addEventListener("DOMContentLoaded", function() { } } - if (document.body.clientWidth < 600 && head) { - var navlink = head.getElementsByTagName("a"); + if (document.body.clientWidth < 600) { + if (head) { + var navlink = head.getElementsByTagName("a"); + + var sel = document.createElement("select"); + sel.id = head.id + "_sel"; + sel.addEventListener("change", function(e){ + window.location.href = this.value; + }); + + for (var i=1; i