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 --- activityPubStruct.go | 2 +- client.go | 1 - static/clover.png | Bin 0 -> 92559 bytes static/js/posts.js | 7 ++++++- static/posts.html | 31 +++++++++++++++++++++++++++---- 5 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 static/clover.png diff --git a/activityPubStruct.go b/activityPubStruct.go index 06c97e1..e790573 100644 --- a/activityPubStruct.go +++ b/activityPubStruct.go @@ -138,7 +138,7 @@ type ObjectBase struct { MediaType string `json:"mediatype,omitempty"` Duration string `json:"duration,omitempty"` Size int64 `json:"size,omitempty"` - Sensitive bool `json:"sensitive"` + Sensitive bool `json:"sensitive,omitempty"` } type CryptoCur struct { diff --git a/client.go b/client.go index 1c2b8ce..d91bbc7 100644 --- a/client.go +++ b/client.go @@ -9,7 +9,6 @@ import "strings" import "strconv" import "sort" import "regexp" -import "os" var Key *string = new(string) 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 }})
- +