From 1496e160da3c6f6cb8742aedced4edefc1211a0b Mon Sep 17 00:00:00 2001
From: Renard
Date: Fri, 12 Apr 2019 13:48:23 -0400
Subject: Revirtiendo cambios de shobon a weabot
Shobon no es cargado en el IB, la función fixFileSize es solo para el IB
---
static/js/shobon.js | 25 -------------------------
static/js/weabot.js | 22 ++++++++++++++++++++++
2 files changed, 22 insertions(+), 25 deletions(-)
(limited to 'static/js')
diff --git a/static/js/shobon.js b/static/js/shobon.js
index e34ee98..8233088 100644
--- a/static/js/shobon.js
+++ b/static/js/shobon.js
@@ -108,10 +108,6 @@ function shobon() {
if(localStorage.getItem("shobon_embedimg") == "true") {
embedImg(reply);
}
- // convertir tamaños de archivo a formato legible
- if(localStorage.getItem("shobon_size") == "true") {
- fixFileSize();
- }
}
if (newRepliesInThread > 0 && !inThread) {
var btnNew = document.createElement("span");
@@ -300,7 +296,6 @@ function shobonSettings(e) {
p.appendChild(createCheckbox("shobon_on", "Activar extensión", true));
p.appendChild(createCheckbox("shobon_navbar", "Fijar barra superior", false));
p.appendChild(createCheckbox("shobon_ids", "Colorear IDs", true));
- p.appendChild(createCheckbox("shobon_size", "Tamaños de archivo legibles", false));
p.appendChild(createCheckbox("shobon_embedimg", "Insertar imágenes miniatura", false));
p.appendChild(createCheckbox("shobon_newposts", "Destacar mensajes nuevos", false));
p.appendChild(createCheckbox("shobon_country", "Reemplazar códigos de país por nombres", false));
@@ -448,26 +443,6 @@ function markId(e) {
}
}
-function readableSize(B) {
- var thresh = 1024;
- if(Math.abs(B) < thresh) return B + " B";
- var units = ["KB","MB","GB"];
- var u = -1;
- do {
- B /= thresh;
- ++u;
- } while(Math.abs(B) >= thresh && u < units.length - 1);
- return B.toFixed(1)+" "+units[u];
-}
-function fixFileSize(){
- var obj = document.getElementsByClassName("fs");
- for (var i=0; i= thresh && u < units.length - 1);
+ return B.toFixed(1)+" "+units[u];
+}
+
+function fixFileSize(){
+ var obj = document.getElementsByClassName("fs");
+ for (var i=0; i