restructured directories

This commit is contained in:
Kevin Froman 2020-10-09 07:44:04 +00:00
parent 94045057c3
commit 14c8aac76b
13 changed files with 30 additions and 17 deletions

View File

@ -11,16 +11,16 @@
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>👁️</text></svg>">
<link rel="stylesheet" href="css/bulma-dark.min.css">
<link rel="stylesheet" href="style.css">
<script src="tordetect.js" async></script>
<script src="marked.min.js" defer></script>
<script src="purify.min.js" defer></script>
<script src="sha3.js" defer></script>
<link rel="stylesheet" href="css/style.css">
<script src="js/tordetect.js" async></script>
<script src="js/marked.min.js" defer></script>
<script src="js/purify.min.js" defer></script>
<script src="js/sha3.js" defer></script>
<script src="jspow/index.js" defer></script>
<script src="onionr-blocks.js" defer></script>
<script src="hush-hush.js" defer></script>
<script src="worker-handler.js" defer></script>
<script src="message-creator.js" defer></script>
<script src="js/onionr-blocks.js" defer></script>
<script src="js/hush-hush.js" defer></script>
<script src="js/worker-handler.js" defer></script>
<script src="js/message-creator.js" defer></script>
</head>
<body>
<section class="section">
@ -38,13 +38,19 @@
JavaScript is required for this app. The server has no knowledge of posts, so content must be served by P2P nodes.
</p></noscript>
<p>kiccan is a message board program that utilizes the <a href="https://onionr.net/">Onionr</a> network.</p>
<p>posts are rate-limited using a partial hash collision proof of work function.</p>
<p>posts are rate-limited and protected using a partial hash collision proof of work function.</p>
<p>kiccan is <i>decentralized as in power</i></p>
<p>⚠️ the host of this web page has no control over posts. Browse and post at your own risk.</p>
<br>
<label class="checkbox">
<input type="checkbox" id="use-markdown" checked>
write using markdown/HTML
</label>
<div class="columns">
<div id="lastReached" class="column has-text-warning is-one-fifth">Last reached network: never</div>
<div class="column">
<label class="checkbox">
<input type="checkbox" id="use-markdown" checked>
draft using markdown/HTML
</label>
</div>
</div>
<p class="is-pulled-right">feed size: <span id="memUsage">0kb</span> | page size: 289kb</p>
<p class="is-hidden has-text-warning noTor">You do not seem to be able to reach .onion services. Please use Tor Browser.</p>
</div>
@ -70,6 +76,9 @@
</section>
<div class="container messageFeed">
</div>
<div class="container block">
<footer>Privacy policy: We log nothing, but Onionr node operators may log data. Nothing personalized is sent to Onionr nodes, but all posts should be considered public and immutable.</footer>
</div>
<template id="cMsgTemplate">
<div class="box cMsgBox">
<div class="columns">

View File

@ -17,7 +17,8 @@
*/
var findMessageIntervalTime = 5000
var publicNodes = [
"ty3rq3kub6gvzpngnrvfsk5emhoh2ltkti62u4ophca6ijciajotqqid"
"ty3rq3kub6gvzpngnrvfsk5emhoh2ltkti62u4ophca6ijciajotqqid",
"aekulizc7lsl4bh3ainlnnbfqtboavitfxuvanqq3eyposdifzzeddqd"
]
var messageHashes = []
var blocks = []
@ -118,9 +119,12 @@ async function apiGET(path, queryString, raw=false){
if (response.ok) { // if HTTP-status is 200-299
// get the response body (the method explained below)
if (raw){
connectedToOnionr = true
return await response.blob()
}
clearTimeout(requestTimeout)
document.getElementById("lastReached").classList.replace("has-text-warning", "has-text-success")
document.getElementById("lastReached").innerText = "Onionr network reached"
return await response.text()
} else {
console.debug("HTTP-Error: " + response.status)
@ -128,9 +132,9 @@ async function apiGET(path, queryString, raw=false){
}
async function findMessages(){
findMessageIntervalTime = 5000
if (document.hidden){
setTimeout(function(){findMessages()}, 1000)
return
findMessageIntervalTime = 10000
}
let messages = (await apiGET("getblocklist", "?type=" + postTopic + "&date=" + lastLookup)).split('\n')
lastLookup = Math.floor((Date.now() / 1000))

View File

View File

View File

View File