aboutsummaryrefslogtreecommitdiff
path: root/static/js
diff options
context:
space:
mode:
authorLibravatar Choom 2023-01-09 20:17:04 -0300
committerLibravatar Choom 2023-01-09 20:45:54 -0300
commit7dbd8f3dc62ea8227f3fe3b5729a1812f1abbb0c (patch)
tree35c7a8039ab907d3dc682331a39f2ae770b95b34 /static/js
parent8e2c4d946bbf58bd5ae50d44b6c5c6b308228379 (diff)
downloadweabot-7dbd8f3dc62ea8227f3fe3b5729a1812f1abbb0c.tar.gz
weabot-7dbd8f3dc62ea8227f3fe3b5729a1812f1abbb0c.tar.xz
weabot-7dbd8f3dc62ea8227f3fe3b5729a1812f1abbb0c.zip
Achicar AA en móvil
Diffstat (limited to 'static/js')
-rw-r--r--static/js/weabotxt.js60
1 files changed, 35 insertions, 25 deletions
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<navlink.length; i++) {
+ var c = document.createElement("option");
+ c.text = navlink[i].textContent;
+ c.value = navlink[i].href;
+ if (navlink[i].className == "cur_brd") {
+ c.selected = true;
+ }
+ sel.options.add(c);
+ }
- var sel = document.createElement("select");
- sel.id = head.id + "_sel";
- sel.addEventListener("change", function(e){
- window.location.href = this.value;
- });
+ head.textContent = ""
+ var home = document.createElement("a");
+ home.text = "Bienvenido a Internet";
+ home.href = "/home.html";
+ head.appendChild(home);
+ head.appendChild(document.createTextNode(" ★ "));
+ head.appendChild(sel);
- for (var i=1; i<navlink.length; i++) {
- var c = document.createElement("option");
- c.text = navlink[i].textContent;
- c.value = navlink[i].href;
- if (navlink[i].className == "cur_brd") {
- c.selected = true;
- }
- sel.options.add(c);
+ head.className = "mob";
+ document.body.style.marginTop = "2em";
}
- head.textContent = ""
- var home = document.createElement("a");
- home.text = "Bienvenido a Internet";
- home.href = "/home.html";
- head.appendChild(home);
- head.appendChild(document.createTextNode(" ★ "));
- head.appendChild(sel);
-
- head.className = "mob";
- document.body.style.marginTop = "2em";
+ var sjis = /(  \|  /|\  |/  | ̄ ̄||  |  ||\|  |  \|)/;
+ var msg = document.getElementsByClassName("msg");
+ for (var i=0; i < msg.length; i++) {
+ if (msg[i].textContent.match(sjis)) {
+ msg[i].classList.add("sjis-mob");
+ }
+ }
}
var forms = document.getElementsByTagName("form");