From 4c1a0a18644a40dd58477685ec9b904216aaa163 Mon Sep 17 00:00:00 2001
From: TOW
Date: Mon, 1 Apr 2019 19:24:42 -0300
Subject: Shobon: Agregada función para incluir imgur
---
static/js/shobon.js | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/static/js/shobon.js b/static/js/shobon.js
index b4e48f6..522dbe1 100644
--- a/static/js/shobon.js
+++ b/static/js/shobon.js
@@ -82,6 +82,11 @@ function shobon() {
if(localStorage.getItem("shobon_navbar") == "true") {
fixedNav();
}
+ // incluye imgur
+ if(localStorage.getItem("shobon_embedimg") == "true") {
+ embedImg(reply);
+ }
+
}
if (newRepliesInThread > 0 && !inThread) {
thread.getElementsByClassName("threadlinks")[0].innerHTML += "Marcar como leido";
@@ -239,6 +244,7 @@ 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_embedimg", "Incluir imágenes de imgur", false));
p.appendChild(createCheckbox("shobon_newposts", "Destacar mensajes nuevos", false));
p.appendChild(createCheckbox("shobon_country", "Reemplazar códigos de país por nombres", false));
p.appendChild(createCheckbox("shobon_time", "Convertir fechas a hora local", true));
@@ -364,6 +370,20 @@ function paintIds(reply) {
}
}
+function embedImg(reply) {
+ var links = reply.getElementsByTagName("a");
+ for(i=0;i