From c78d2f1d22e49868870166ead4b115731e054b4f Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Wed, 7 Jul 2021 10:46:04 -0700 Subject: added media proxy for remote links --- static/faq.html | 4 ++-- static/index.html | 20 +++++++++----------- static/ncatalog.html | 6 +++--- static/posts.html | 32 ++++++++++++++++---------------- 4 files changed, 30 insertions(+), 32 deletions(-) (limited to 'static') diff --git a/static/faq.html b/static/faq.html index f98fd9c..35c07f0 100644 --- a/static/faq.html +++ b/static/faq.html @@ -10,7 +10,7 @@

FAQ

What is fchan?

-

fchan, short for FChannel, is a federated image board based on ActivityPub, a protocol which allows social sites like social media and image boards to be decentralized. Boards across sites which are on the opposite sides of the Globe can be connected and feeds can be shared or followed. It strives to be familiar looking to regular *chan users.

You can get the source code on https://github.com/FChannel0 which is available under AGPLv3, which means that you can modify the source code of fchan however you like as long as you share your source code with everyone else. We appreciate and encourage any positive contributions to the source code!

+

fchan, short for FChannel, is a federated image board based on ActivityPub, a protocol which allows social sites like social media and image boards to be decentralized. Boards across sites which are on the opposite sides of the Globe can be connected and feeds can be shared or followed. It pulls likeness from other chans for ease of familiarity and use.

You can get the source code on https://github.com/FChannel0 which is available under AGPLv3, which means that you can modify the source code of fchan however you like as long as you share your source code with everyone else. We appreciate and encourage any positive contributions to the source code!

What are the "Options" used for when posting?

The "Options" field can be used for special options when posting.

@@ -56,7 +56,7 @@

Soon™.

What version is this FChannel instance?

-

v0.6.1-dev

+

v0.0.7-dev

[Home][Rules][FAQ] diff --git a/static/index.html b/static/index.html index 667efd4..b706e6b 100644 --- a/static/index.html +++ b/static/index.html @@ -64,17 +64,15 @@ {{ end }}
{{ end }} diff --git a/static/ncatalog.html b/static/ncatalog.html index 1f6fc69..4c6c589 100644 --- a/static/ncatalog.html +++ b/static/ncatalog.html @@ -67,7 +67,7 @@ img.style = "max-width: 180px; max-height: 180px;" img.setAttribute("id", "img") img.setAttribute("main", "1") - img.setAttribute("src", "{{ (index .Attachment 0).Href }}") + img.setAttribute("src", "{{ proxy (index .Attachment 0).Href }}") media.appendChild(img) } @@ -75,7 +75,7 @@ var audio = document.createElement("audio") audio.controls = 'controls' audio.preload = 'metadata' - audio.src = '{{ (index .Attachment 0).Href }}' + audio.src = '{{ proxy (index .Attachment 0).Href }}' audio.type = '{{ (index .Attachment 0).MediaType }}' audio.style = "margin-right: 10px; margin-bottom: 10px; max-width: 180px; max-height: 180px;" audio.innerText = 'Audio is not supported.' @@ -87,7 +87,7 @@ video.controls = 'controls' video.preload = 'metadata' video.muted = 'muted' - video.src = '{{ (index .Attachment 0).Href }}' + video.src = '{{ proxy (index .Attachment 0).Href }}' video.type = '{{ (index .Attachment 0).MediaType }}' video.style = "margin-right: 10px; margin-bottom: 10px; max-width: 180px; max-height: 180px;" video.innerText = 'Video is not supported.' diff --git a/static/posts.html b/static/posts.html index 319da03..d16f780 100644 --- a/static/posts.html +++ b/static/posts.html @@ -16,7 +16,7 @@ [Delete Attachment] [Mark Sensitive] {{ end }} - File: {{ (index .Attachment 0).Name }}({{ (index .Attachment 0).Size }}) + File: {{ (index .Attachment 0).Name }}({{ (index .Attachment 0).Size }})
@@ -49,13 +49,13 @@ img.setAttribute("id", "img") img.setAttribute("main", "1") img.setAttribute("enlarge", "0") - img.setAttribute("attachment", "{{ (index .Attachment 0).Href }}") + img.setAttribute("attachment", "{{ proxy (index .Attachment 0).Href }}") {{ if .Preview.Href }} - img.setAttribute("src", "{{ .Preview.Href }}") - img.setAttribute("preview", "{{ .Preview.Href }}") + img.setAttribute("src", "{{ proxy .Preview.Href }}") + img.setAttribute("preview", "{{ proxy .Preview.Href }}") {{ else }} - img.setAttribute("src", "{{ (index .Attachment 0).Href }}") - img.setAttribute("preview", "{{ (index .Attachment 0).Href }}") + img.setAttribute("src", "{{ proxy (index .Attachment 0).Href }}") + img.setAttribute("preview", "{{ proxy (index .Attachment 0).Href }}") {{ end }} media.appendChild(img) } @@ -64,7 +64,7 @@ var audio = document.createElement("audio") audio.controls = 'controls' audio.preload = 'metadata' - audio.src = '{{ (index .Attachment 0).Href }}' + audio.src = '{{ proxy (index .Attachment 0).Href }}' audio.type = '{{ (index .Attachment 0).MediaType }}' audio.style = "float: left; margin-right: 10px; margin-bottom: 10px; max-width: 250px; max-height: 250px;" audio.innerText = 'Audio is not supported.' @@ -76,7 +76,7 @@ video.controls = 'controls' video.preload = 'metadata' video.muted = 'muted' - video.src = '{{ (index .Attachment 0).Href }}' + video.src = '{{ proxy (index .Attachment 0).Href }}' video.type = '{{ (index .Attachment 0).MediaType }}' video.style = "float: left; margin-right: 10px; margin-bottom: 10px; max-width: 250px; max-height: 250px;" video.innerText = 'Video is not supported.' @@ -106,7 +106,7 @@ [Delete Attachment] [Mark Sensitive] {{ end }} - File {{ (index .Attachment 0).Name }} ({{ (index .Attachment 0).Size }}) + File {{ (index .Attachment 0).Name }} ({{ (index .Attachment 0).Size }})
@@ -140,14 +140,14 @@ img.setAttribute("id", "img") img.setAttribute("main", "1") img.setAttribute("enlarge", "0") - img.setAttribute("attachment", "{{ (index .Attachment 0).Href }}") + img.setAttribute("attachment", "{{ proxy (index .Attachment 0).Href }}") img.setAttribute("post", "{{ .Id }}") {{ if and .Preview.Href . }} - img.setAttribute("src", "{{ .Preview.Href }}") - img.setAttribute("preview", "{{ .Preview.Href }}") + img.setAttribute("src", "{{ proxy .Preview.Href }}") + img.setAttribute("preview", "{{ proxy .Preview.Href }}") {{ else }} - img.setAttribute("src", "{{ (index .Attachment 0).Href }}") - img.setAttribute("preview", "{{ (index .Attachment 0).Href }}") + img.setAttribute("src", "{{ proxy (index .Attachment 0).Href }}") + img.setAttribute("preview", "{{ proxy (index .Attachment 0).Href }}") {{ end }} media.appendChild(img) } @@ -156,7 +156,7 @@ var audio = document.createElement("audio") audio.controls = 'controls' audio.preload = 'metadata' - audio.src = '{{ (index .Attachment 0).Href }}' + audio.src = '{{ proxy (index .Attachment 0).Href }}' audio.type = '{{ (index .Attachment 0).MediaType }}' audio.style = "float: left; margin-right: 10px; margin-bottom: 10px; max-width: 250px; max-height: 250px;" audio.innerText = 'Audio is not supported.' @@ -168,7 +168,7 @@ video.controls = 'controls' video.preload = 'metadata' video.muted = 'muted' - video.src = '{{ (index .Attachment 0).Href }}' + video.src = '{{ proxy (index .Attachment 0).Href }}' video.type = '{{ (index .Attachment 0).MediaType }}' video.style = "float: left; margin-right: 10px; margin-bottom: 10px; max-width: 250px; max-height: 250px;" video.innerText = 'Video is not supported.' -- cgit v1.2.3