commit: 0fd567e037a360a29acbd97305664311e761f071
parent: bebdb482d4625a850a55a8eb2dae6d0378730456
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sun, 24 Mar 2019 16:41:33 +0100
Link to the documentation instead
Diffstat:
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/about.html b/about.html
@@ -45,7 +45,7 @@
</section>
<section>
<h2>Federation</h2>
- <p>Quarantined means the instance doesn’t send posts that aren’t public or unlisted to try to avoid privacy leaks.</p>
+ <p>For the meaning of each settings I would recommend viewing the <a href="/doc/index.html">documentation of this instance</a> or using the link on the preference name which takes you to their location in the documentation.</p>
<h3>List of Federation Settings</h3>
<p id="mrf_noscript">You do not seem to have JavaScript enabled, sorry but for now either look in <a href="https://queer.hacktivis.me/nodeinfo/2.0.json">nodeinfo’s JSON</a> or enable JavaScript (the code is readable).</p>
<ul id="federation_list"></ul>
diff --git a/about.js b/about.js
@@ -1,9 +1,15 @@
mrf_noscript = document.getElementById("mrf_noscript");
federation_list = document.getElementById("federation_list");
-var render_mrf_settings = function(name, settings) {
+var config_doc_url = '/doc/config.html';
+
+var render_mrf_settings = function(name, settings, id_name) {
if(name && settings) {
- html = "<li>"+name+":<ul>";
+ if(id_name) {
+ html = "<li><a href='"+config_doc_url+"#"+id_name+"'>"+name+"</a>:<ul>";
+ } else {
+ html = "<li>"+name+":<ul>";
+ }
for(const [key, values] of Object.entries(settings)) {
html += "<li><code class='mrf_setting-key'>"+key+"</code>: <code class='mrf_settings-values'>"+values.join(", ")+"</code></li>"
@@ -30,11 +36,11 @@ request.onload = function()
federation_html += "</code></li>";
}
- federation_html += render_mrf_settings("MRF Simple", federation_metadata.mrf_simple);
- federation_html += render_mrf_settings("MRF Keywords", federation_metadata.mrf_keyword);
+ federation_html += render_mrf_settings("MRF Simple", federation_metadata.mrf_simple, "mrf_simple");
+ federation_html += render_mrf_settings("MRF Keywords", federation_metadata.mrf_keyword, "mrf_keyword");
if(federation_metadata.quarantined_instances) {
- federation_html += "<li>Quarantined: <code class='mrf_settings-values'>";
+ federation_html += "<li><a href='"+config_doc_url+"#instance'>Quarantined</a>: <code class='mrf_settings-values'>";
federation_html += federation_metadata.quarantined_instances.join(", ");
federation_html += "</code></li>";
}