work on making basic board
This commit is contained in:
parent
2fde909d86
commit
9604849dbb
@ -1,11 +1,7 @@
|
||||
webpassword = ''
|
||||
requested = []
|
||||
|
||||
document.getElementById('webpassWindow').style.display = 'block';
|
||||
|
||||
var windowHeight = window.innerHeight;
|
||||
document.getElementById('webpassWindow').style.height = windowHeight + "px";
|
||||
|
||||
webpassword = webpass
|
||||
function httpGet(theUrl) {
|
||||
var xmlHttp = new XMLHttpRequest()
|
||||
xmlHttp.open( "GET", theUrl, false ) // false for synchronous request
|
||||
@ -35,23 +31,13 @@ function getBlocks(){
|
||||
var blockList = feedText.split(',')
|
||||
for (i = 0; i < blockList.length; i++){
|
||||
if (! requested.includes(blockList[i])){
|
||||
bl = httpGet('/gethtmlsafeblockdata/' + blockList[i])
|
||||
bl = httpGet('/getblockdata/' + blockList[i])
|
||||
appendMessages(bl)
|
||||
requested.push(blockList[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('registerPassword').onclick = function(){
|
||||
webpassword = document.getElementById('webpassword').value
|
||||
if (httpGet('/ping') === 'pong!'){
|
||||
document.getElementById('webpassWindow').style.display = 'none'
|
||||
getBlocks()
|
||||
}
|
||||
else{
|
||||
alert('Sorry, but that password appears invalid.')
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('refreshFeed').onclick = function(){
|
||||
getBlocks()
|
||||
|
@ -9,14 +9,10 @@
|
||||
<link rel='stylesheet' href='theme.css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='webpassWindow' class='hidden'>
|
||||
<p>Welcome to OnionrBoard</p>
|
||||
<p>Please enter the webpassword. You can get this from running the 'details' command in Onionr.</p>
|
||||
<input id='webpassword' type='password' placeholder="Web password for daemon" value='CBF15ED9782FB482339E5F5B9DDCF3E58E523E71E8E9EF480596817AB5EA2E63'>
|
||||
<button id='registerPassword'>Unlock Onionr</button>
|
||||
</div>
|
||||
|
||||
<input type='button' id='refreshFeed' value='Refresh Feed'>
|
||||
<div id='feed'><span id='none'>None Yet :)</span></div>
|
||||
<script src='/shared/misc.js'></script>
|
||||
<script src='board.js'></script>
|
||||
</body>
|
||||
</html>
|
@ -26,7 +26,7 @@
|
||||
<h2>Onionr Services</h2>
|
||||
<label>Open Site: <input type='text' id='siteViewer' placeholder='Site Hash'> <button id='openSite' class='primaryBtn openSiteBtn'>Open Onionr Site</button></label>
|
||||
<br>
|
||||
<br><br><a class='idLink' href='/mail/'>Mail</a> - <a class='idLink' href='/friends/'>Friend Manager</a>
|
||||
<br><br><a class='idLink' href='/mail/'>Mail</a> - <a class='idLink' href='/friends/'>Friend Manager</a> - <a class='idLink' href='/board/'>Boards</a>
|
||||
<br><br><hr>
|
||||
<h2>Stats</h2>
|
||||
<p>🕰️ Uptime: <span id='uptime'></span></p>
|
||||
|
Loading…
Reference in New Issue
Block a user