aboutsummaryrefslogtreecommitdiff
path: root/static/js
diff options
context:
space:
mode:
Diffstat (limited to 'static/js')
-rw-r--r--static/js/weabot.js14
1 files changed, 5 insertions, 9 deletions
diff --git a/static/js/weabot.js b/static/js/weabot.js
index 04ac483..693d138 100644
--- a/static/js/weabot.js
+++ b/static/js/weabot.js
@@ -146,10 +146,12 @@ function filePreview(e) {
prev.removeAttribute("style");
var fname =
file.name.length < 20 ? file.name : file.name.substr(0, 19) + "…";
- if (file.type.startsWith("image"))
+ if (file.type.startsWith("image")) {
prev.insertAdjacentHTML("beforeend",
- '<img class="thumbpreview" src="' + read.result + '" /> ' + fname);
- else prev.insertAdjacentHTML("beforeend", fname);
+ '<img id="thumbpreview" src="' + read.result + '" /> ' + fname);
+ } else {
+ prev.insertAdjacentHTML("beforeend", fname);
+ }
prev.appendChild(document.createTextNode(" ["));
var btn = document.createElement("a");
btn.href = "#";
@@ -336,12 +338,6 @@ document.addEventListener("DOMContentLoaded", function(e) {
this.innerText = (this.innerText == "Pequeño") ? "Grande" : "Pequeño";
});
- document.getElementById("cat-hide").addEventListener("click", function(e) {
- e.preventDefault();
- cat.classList.toggle("notxt");
- this.innerText = (this.innerText == "Ocultar") ? "Mostrar" : "Ocultar";
- });
-
document.getElementById("cat-srch").addEventListener("keyup", catSearch);
document.getElementById("hid-num").addEventListener("click", function(e) {