From 88521d92e6228a5bbfe1b0a5303bb1bd9cb5d955 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Wed, 12 May 2021 22:07:13 -0700 Subject: cleaned up manage page style --- static/js/posts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'static/js/posts.js') diff --git a/static/js/posts.js b/static/js/posts.js index 592a35d..118c362 100644 --- a/static/js/posts.js +++ b/static/js/posts.js @@ -131,7 +131,7 @@ function convertContent(actorName, content, opid) }) } - re = /^>.+/gm; + re = /^(\s+)?>.+/gm; match = newContent.match(re); if(match) -- cgit v1.2.3 From dfa4f1a3fe42ca9896879d933cb5fd33afd71a8a Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Wed, 12 May 2021 23:10:53 -0700 Subject: adjusted reply-box clipping --- static/js/posts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'static/js/posts.js') diff --git a/static/js/posts.js b/static/js/posts.js index 118c362..8dd05eb 100644 --- a/static/js/posts.js +++ b/static/js/posts.js @@ -184,7 +184,7 @@ function quote(actorName, opid, id) if(id == "reply") { var h = document.getElementById(id + "-content").offsetTop - 548; } else { - var h = document.getElementById(id + "-content").offsetTop - 448; + var h = document.getElementById(id + "-content").offsetTop - 348; } -- cgit v1.2.3 From 60b6bdf1c021fcffff397c7b1439a1407ed90f0a Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Tue, 1 Jun 2021 00:45:05 -0700 Subject: changed actor to type Group and other clean up --- static/js/posts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'static/js/posts.js') diff --git a/static/js/posts.js b/static/js/posts.js index 8dd05eb..b2bfd7a 100644 --- a/static/js/posts.js +++ b/static/js/posts.js @@ -212,7 +212,7 @@ function report(actorName, id) var inReplyTo = document.getElementById("report-inReplyTo-box"); var w = window.innerWidth / 2 - 200; - var h = document.getElementById(id + "-content").offsetTop - 448; + var h = document.getElementById(id + "-content").offsetTop - 348; box.setAttribute("style", "display: block; position: absolute; width: 400px; height: 480px; z-index: 9; top: " + h + "px; left: " + w + "px; padding: 5px;"); -- cgit v1.2.3 From 9d937e6f895ca7213ae759efca9b292a1d014ab3 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Thu, 3 Jun 2021 01:19:37 -0700 Subject: cleaning up removing posts --- static/js/posts.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'static/js/posts.js') diff --git a/static/js/posts.js b/static/js/posts.js index b2bfd7a..077b654 100644 --- a/static/js/posts.js +++ b/static/js/posts.js @@ -26,6 +26,8 @@ function shortURL(actorName, url) { re = /.+\//g; temp = re.exec(url) + + var output if(stripTransferProtocol(temp[0]) == stripTransferProtocol(actorName) + "/") { @@ -39,11 +41,8 @@ function shortURL(actorName, url) re = /\w+$/g; - u = re.exec(short); - - return u; + output = re.exec(short); }else{ - var short = url.replace("https://", ""); short = short.replace("http://", ""); short = short.replace("www.", ""); @@ -64,10 +63,10 @@ function shortURL(actorName, url) v = re.exec(str) - v = "f" + v[0] + "-" + u - - return v; + output = "f" + v[0] + "-" + u } + + return output } function shortImg(url) @@ -113,7 +112,7 @@ function getBoardId(url) function convertContent(actorName, content, opid) { - var re = /(>>)(https:\/\/|http:\/\/)?(www\.)?.+\/\w+/gm; + var re = /(>>)(https?:\/\/)?(www\.)?.+\/\w+/gm; var match = content.match(re); var newContent = content; if(match) -- cgit v1.2.3 From cc24155859b65653495747bd0b38be9bcef33298 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Thu, 17 Jun 2021 00:21:07 -0700 Subject: added html meta data as well as basic hover effect on links --- static/js/posts.js | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) (limited to 'static/js/posts.js') diff --git a/static/js/posts.js b/static/js/posts.js index 077b654..5be272a 100644 --- a/static/js/posts.js +++ b/static/js/posts.js @@ -124,8 +124,14 @@ function convertContent(actorName, content, opid) { isOP = " (OP)"; } - - newContent = newContent.replace(quote, '>>' + shortURL(actorName, link) + isOP + ''); + + var q = link + + if(document.getElementById(link + "-content") != null) { + q = document.getElementById(link + "-content").innerText; + } + + newContent = newContent.replace(quote, '>>' + shortURL(actorName, link) + isOP + ''); }) } @@ -143,6 +149,35 @@ function convertContent(actorName, content, opid) return newContent } +function convertContentNoLink(actorName, content, opid) +{ + var re = /(>>)(https?:\/\/)?(www\.)?.+\/\w+/gm; + var match = content.match(re); + var newContent = content; + if(match) + { + match.forEach(function(quote, i){ + var link = quote.replace('>>', '') + var isOP = "" + if(link == opid) + { + isOP = " (OP)"; + } + + var q = link + + if(document.getElementById(link + "-content") != null) { + q = document.getElementById(link + "-content").innerText; + } + + newContent = newContent.replace(quote, '>>>' + shortURL(actorName, link) + isOP); + + }) + } + + return newContent +} + function closeReply() { document.getElementById("reply-box").style.display = "none"; -- cgit v1.2.3 From 092cfce209ac6eb2878242378afcda539709a4af Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Thu, 17 Jun 2021 01:05:57 -0700 Subject: escaping quotes to not break hover, it will probably still break --- static/js/posts.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'static/js/posts.js') diff --git a/static/js/posts.js b/static/js/posts.js index 5be272a..78f3cae 100644 --- a/static/js/posts.js +++ b/static/js/posts.js @@ -129,6 +129,7 @@ function convertContent(actorName, content, opid) if(document.getElementById(link + "-content") != null) { q = document.getElementById(link + "-content").innerText; + q = q.replaceAll('>', '/\>') } newContent = newContent.replace(quote, '>>' + shortURL(actorName, link) + isOP + ''); @@ -143,10 +144,11 @@ function convertContent(actorName, content, opid) { match.forEach(function(quote, i) { newContent = newContent.replace(quote, '' + quote + ''); + newContent = newContent.replace(quote, '' + quote + ''); }) } - return newContent + return newContent.replaceAll('/\>', '>') } function convertContentNoLink(actorName, content, opid) -- cgit v1.2.3 From a257a631ad6c9d6bcb3ae91057ca74a5e1d9515c Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Thu, 17 Jun 2021 11:38:27 -0700 Subject: replacing quotes for hover preview because it breaks without it --- static/js/posts.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'static/js/posts.js') diff --git a/static/js/posts.js b/static/js/posts.js index 78f3cae..e46fed3 100644 --- a/static/js/posts.js +++ b/static/js/posts.js @@ -130,8 +130,9 @@ function convertContent(actorName, content, opid) if(document.getElementById(link + "-content") != null) { q = document.getElementById(link + "-content").innerText; q = q.replaceAll('>', '/\>') + q = q.replaceAll('"', '') + q = q.replaceAll("'", "") } - newContent = newContent.replace(quote, '>>' + shortURL(actorName, link) + isOP + ''); }) @@ -143,8 +144,8 @@ function convertContent(actorName, content, opid) if(match) { match.forEach(function(quote, i) { + newContent = newContent.replace(quote, '' + quote + ''); - newContent = newContent.replace(quote, '' + quote + ''); }) } @@ -172,12 +173,11 @@ function convertContentNoLink(actorName, content, opid) q = document.getElementById(link + "-content").innerText; } - newContent = newContent.replace(quote, '>>>' + shortURL(actorName, link) + isOP); - + newContent = newContent.replace(quote, '>>' + shortURL(actorName, link) + isOP); }) } - - return newContent + newContent = newContent.replaceAll("'", "") + return newContent.replaceAll('"', '') } function closeReply() -- cgit v1.2.3 From b4f7d00ad9d13f96323366ded2eb7702e37f6e52 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sat, 19 Jun 2021 19:04:43 -0700 Subject: admin can mark objects as senstive --- static/js/posts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'static/js/posts.js') diff --git a/static/js/posts.js b/static/js/posts.js index e46fed3..06aab77 100644 --- a/static/js/posts.js +++ b/static/js/posts.js @@ -224,7 +224,7 @@ function quote(actorName, opid, id) } - box.setAttribute("style", "display: block; position: absolute; width: 400px; height: 550px; z-index: 9; top: " + h + "px; left: " + w + "px; padding: 5px;"); + box.setAttribute("style", "display: block; position: absolute; width: 400px; height: 600px; z-index: 9; top: " + h + "px; left: " + w + "px; padding: 5px;"); if (inReplyTo.value != opid) -- cgit v1.2.3