Add disclaimer and links to footer

dev
gravel 1 year ago
parent d8c1542ba6
commit 529f6e86a8
Signed by: gravel
GPG Key ID: C0538F3C906B308F

@ -4,10 +4,10 @@
export const dom = {
tbl_communities: () => document.getElementById("tbl_communities"),
td_last_checked: () => document.getElementById("td_last_checked"),
last_checked: () => document.getElementById("last_checked_value"),
qr_modal: (communityID) => document.getElementById(`modal_${communityID}`),
join_urls: () => document.getElementsByClassName("td_join_url"),
td_summary: () => document.getElementById("td_summary"),
servers_hidden: () => document.getElementById("servers_hidden"),
snackbar: () => document.getElementById("copy-snackbar")
}

@ -92,9 +92,8 @@ function hideBadCommunities() {
.reduce((a, b) => a + b);
}
// Not ideal. Separate element should be allocated for content.
const summary = dom.td_summary();
summary.innerText += ` (${numberOfHiddenCommunities} hidden)`;
const summary = dom.servers_hidden();
summary.innerText = `(${numberOfHiddenCommunities} hidden)`;
}
/**
@ -131,9 +130,8 @@ function setLastChecked(last_checked) {
const time_passed_in_seconds = seconds_now - last_checked;
const time_passed_in_minutes =
Math.floor(time_passed_in_seconds / 60); // time in minutes, rounded down
const timestamp_element = dom.td_last_checked();
timestamp_element.innerText =
`Last checked ${time_passed_in_minutes} minutes ago.`;
const timestamp_element = dom.last_checked();
timestamp_element.innerText = `${time_passed_in_minutes} minutes`;
}
/**

@ -19,11 +19,23 @@
.copy_button { }
#tbl_footer { width:100%; }
footer {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
text-align: center;
}
#td_summary { text-align: center; }
#td_last_checked { text-align: center; }
footer p {
width: 75%;
margin: .5em;
text-align: center;
}
footer nav a {
margin: 0 .5ch;
}
/* <Colors> */
:root {

@ -22,18 +22,63 @@
<?php include "+components/qr_modals.php" ?>
<?php include "+components/tbl_communities.php" ?>
<table id="tbl_footer">
<tr>
<td id="td_summary">
<?=count($rooms_assoc)?> unique Session Communities
on <?=count_servers($rooms_assoc)?> servers have been found.
</td>
</tr>
<tr>
<td id="td_last_checked">Last checked X minutes ago.</td>
</tr>
</table>
<hr>
<footer>
<p id="server_summary">
<?=count($rooms_assoc)?> unique Session Communities
on <?=count_servers($rooms_assoc)?> servers have been found.
<span id="servers_hidden">(None hidden as JS is off)</span>
</p>
<p id="last_checked">
Last checked <span id="last_checked_value"></span> ago.
</p>
<p id="disclaimer">
This site is not affiliated with
<a href="https://optf.ngo">Oxen Tech Privacy Foundation</a>.
<br>
Communities shown are fetched automatically from
various sources.
<br>
We make an attempt to hide communities containing
objectionable or illegal content, but
you should still proceed with caution.
</p>
<noscript>
<p>
This site works fine without JavaScript.
However, some interactive features are
only available with JS enabled.
</p>
</noscript>
<nav>
<a
href="https://lokilocker.com/Mods/Session-Groups/wiki/Session-Closed-Groups"
target="_blank"
title="Closed groups curated by community moderators"
>Closed Groups</a>
<a
href="https://session.directory/"
target="_blank"
title="User-submitted closed groups, communities and user profiles. Not safe for work."
>session.directory</a>
<a
href="https://github.com/oxen-io/session-pysogs"
target="_blank"
title="Information about running a community server"
>Host Your Own Community</a>
<a
href="https://getsession.org/terms-of-service"
target="_blank"
>Session Terms Of Service</a>
<a
href="https://github.com/mdPlusPlus/sessioncommunities.online"
target="_blank"
title="sessioncommunities.online repository on GitHub."
>Source Code & Contact</a>
</nav>
</footer>
<div id="copy-snackbar">
Copied URL to clipboard. Paste into Session app to join

Loading…
Cancel
Save