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/js/posts.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'static/js/posts.js') 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 +} -- cgit v1.2.3