diff options
author | FChannel <> | 2021-07-31 12:10:31 -0700 |
---|---|---|
committer | FChannel <> | 2021-07-31 12:10:31 -0700 |
commit | 4a9452985a127a53572358c3b86a425a5df616e1 (patch) | |
tree | f83f0a0ee92e8167195f06f286bff28fe892581d /static | |
parent | ac288d40da3235b9382d685c9958ad167a758bcd (diff) |
removed javascript causing errors and updated readme with xmpp room
Diffstat (limited to 'static')
-rw-r--r-- | static/faq.html | 2 | ||||
-rw-r--r-- | static/js/posts.js | 7 | ||||
-rw-r--r-- | static/ncatalog.html | 5 | ||||
-rw-r--r-- | static/npost.html | 1 | ||||
-rw-r--r-- | static/posts.html | 8 |
5 files changed, 8 insertions, 15 deletions
diff --git a/static/faq.html b/static/faq.html index fd06956..f4fb237 100644 --- a/static/faq.html +++ b/static/faq.html @@ -56,7 +56,7 @@ <p>Soon™.</p> <h4 id="version">What version is this FChannel instance?</h4> - <p>v0.0.13-release</p> + <p>v0.0.14-release</p> </div> <div style="width: 500px; margin:0 auto; margin-top: 50px; text-align: center;"> <a href="/">[Home]</a><a href="/static/rules.html">[Rules]</a><a href="/static/faq.html">[FAQ]</a> diff --git a/static/js/posts.js b/static/js/posts.js index 9b8a743..455e7ea 100644 --- a/static/js/posts.js +++ b/static/js/posts.js @@ -357,10 +357,3 @@ 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/ncatalog.html b/static/ncatalog.html index 8ce418a..65a7d84 100644 --- a/static/ncatalog.html +++ b/static/ncatalog.html @@ -44,7 +44,8 @@ <script> media = document.getElementById("media-{{ .Id }}") - if(({{ .Sensitive }} && {{ $board.Actor.Restricted }}) || (isOnion("{{ .Id }}") && !isOnion("{{ $board.Domain }}"))){ sensitive = document.getElementById("sensitive-{{ .Id }}") + if(({{ .Sensitive }} && {{ $board.Actor.Restricted }}) || ({{ isOnion .Id }} && !{{ isOnion $board.Domain }}){ + sensitive = document.getElementById("sensitive-{{ .Id }}") hide = document.getElementById("hide-{{ .Id }}") sensitive.onclick = function(){document.getElementById("media-{{ .Id }}").style="display: block;"; document.getElementById("sensitive-{{ .Id }}").style="display: none;"; document.getElementById("hide-{{ .Id }}").style="display: block; cursor: pointer;"} hide.onclick = function(){document.getElementById("media-{{ .Id }}").style="display: none;"; document.getElementById("sensitive-{{ .Id }}").style="display: block;"; document.getElementById("hide-{{ .Id }}").style="display: none;"} @@ -52,7 +53,7 @@ media.style = "display: none;" } - if(isOnion("{{ .Id }}") && !isOnion("{{ $board.Domain }}")) { + if({{ isOnion .Id }} && !{{ isOnion $board.Domain }}) { sensitive = document.getElementById("sensitive-{{ .Id }}") document.getElementById("sensitive-img-{{ .Id }}").src = "/static/onion.png" document.getElementById("sensitive-text-{{ .Id }}").innerText = "Tor Instance" diff --git a/static/npost.html b/static/npost.html index 2f0778f..b0f89e6 100644 --- a/static/npost.html +++ b/static/npost.html @@ -50,7 +50,6 @@ {{ end }} {{ define "script" }} -<script src="/static/js/posts.js"></script> <script src="/static/js/footerscript.js"></script> <script src="/static/js/timer.js"></script> {{ end }} diff --git a/static/posts.html b/static/posts.html index 0349ebb..c4f19d8 100644 --- a/static/posts.html +++ b/static/posts.html @@ -24,7 +24,7 @@ <div id="media-{{ .Id }}">{{ parseAttachment . false }}</div> <script> media = document.getElementById("media-{{ .Id }}") - if(({{ .Sensitive }} && {{ $board.Actor.Restricted }}) || (isOnion("{{ .Id }}") && !isOnion("{{ $board.Domain }}"))){ + if(({{ .Sensitive }} && {{ $board.Actor.Restricted }}) || {{ isOnion .Id }} && !{{ isOnion $board.Domain }}){ sensitive = document.getElementById("sensitive-{{ .Id }}") hide = document.getElementById("hide-{{ .Id }}") sensitive.onclick = function(){document.getElementById("media-{{ .Id }}").style="display: block;"; document.getElementById("sensitive-{{ .Id }}").style="display: none;"; document.getElementById("hide-{{ .Id }}").style="display: block; cursor: pointer;"} @@ -33,7 +33,7 @@ media.style = "display: none;" } - if(isOnion("{{ .Id }}") && !isOnion("{{ $board.Domain }}")) { + if({{ isOnion .Id }} && !{{ isOnion $board.Domain }}) { sensitive = document.getElementById("sensitive-{{ .Id }}") document.getElementById("sensitive-img-{{ .Id }}").src = "/static/onion.png" document.getElementById("sensitive-text-{{ .Id }}").innerText = "Tor Instance" @@ -76,7 +76,7 @@ <script> media = document.getElementById("media-{{ .Id }}") - if(({{ .Sensitive }} && {{ $board.Actor.Restricted }}) || (isOnion("{{ .Id }}") && !isOnion("{{ $board.Domain }}"))){ + if(({{ .Sensitive }} && {{ $board.Actor.Restricted }}) || {{ isOnion .Id }} && !{{ isOnion $board.Domain }}){ sensitive = document.getElementById("sensitive-{{ .Id }}") hide = document.getElementById("hide-{{ .Id }}") sensitive.onclick = function(){document.getElementById("media-{{ .Id }}").style="display: block;"; document.getElementById("sensitive-{{ .Id }}").style="display: none;"; document.getElementById("hide-{{ .Id }}").style="display: block; cursor: pointer;"} @@ -85,7 +85,7 @@ media.style = "display: none;" } - if(isOnion("{{ .Id }}") && !isOnion("{{ $board.Domain }}")) { + if({{ isOnion .Id }} && !{{ isOnion $board.Domain }}) { sensitive = document.getElementById("sensitive-{{ .Id }}") document.getElementById("sensitive-img-{{ .Id }}").src = "/static/onion.png" document.getElementById("sensitive-text-{{ .Id }}").innerText = "Tor Instance" |