From 057c5639222dc773ff8d588ab122cc267b27c187 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Mon, 28 Jun 2021 20:09:42 -0700 Subject: added tor image in place of broken links. if user is using tor they just click the image to view it --- static/clover.png | Bin 0 -> 92559 bytes static/js/posts.js | 7 ++++++- static/posts.html | 31 +++++++++++++++++++++++++++---- 3 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 static/clover.png (limited to 'static') diff --git a/static/clover.png b/static/clover.png new file mode 100644 index 0000000..305748e Binary files /dev/null and b/static/clover.png differ diff --git a/static/js/posts.js b/static/js/posts.js index 06aab77..79fb7c4 100644 --- a/static/js/posts.js +++ b/static/js/posts.js @@ -296,7 +296,12 @@ function dragElement(elmnt) { function stripTransferProtocol(value){ var re = /(https:\/\/|http:\/\/)?(www.)?/ - return value.replace(re, "") } +function isOnion(value){ + var re = /\.onion/ + if(value.match(re) != null) + return true + return false +} diff --git a/static/posts.html b/static/posts.html index 1b1d78b..194c273 100644 --- a/static/posts.html +++ b/static/posts.html @@ -18,19 +18,30 @@ {{ end }} File: {{ (index .Attachment 0).Name }}({{ (index .Attachment 0).Size }}) - +