work on making basic board
parent
2fde909d86
commit
9604849dbb
|
@ -1,11 +1,7 @@
|
||||||
webpassword = ''
|
|
||||||
requested = []
|
requested = []
|
||||||
|
|
||||||
document.getElementById('webpassWindow').style.display = 'block';
|
|
||||||
|
|
||||||
var windowHeight = window.innerHeight;
|
var windowHeight = window.innerHeight;
|
||||||
document.getElementById('webpassWindow').style.height = windowHeight + "px";
|
webpassword = webpass
|
||||||
|
|
||||||
function httpGet(theUrl) {
|
function httpGet(theUrl) {
|
||||||
var xmlHttp = new XMLHttpRequest()
|
var xmlHttp = new XMLHttpRequest()
|
||||||
xmlHttp.open( "GET", theUrl, false ) // false for synchronous request
|
xmlHttp.open( "GET", theUrl, false ) // false for synchronous request
|
||||||
|
@ -35,23 +31,13 @@ function getBlocks(){
|
||||||
var blockList = feedText.split(',')
|
var blockList = feedText.split(',')
|
||||||
for (i = 0; i < blockList.length; i++){
|
for (i = 0; i < blockList.length; i++){
|
||||||
if (! requested.includes(blockList[i])){
|
if (! requested.includes(blockList[i])){
|
||||||
bl = httpGet('/gethtmlsafeblockdata/' + blockList[i])
|
bl = httpGet('/getblockdata/' + blockList[i])
|
||||||
appendMessages(bl)
|
appendMessages(bl)
|
||||||
requested.push(blockList[i])
|
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(){
|
document.getElementById('refreshFeed').onclick = function(){
|
||||||
getBlocks()
|
getBlocks()
|
||||||
|
|
|
@ -9,14 +9,10 @@
|
||||||
<link rel='stylesheet' href='theme.css'>
|
<link rel='stylesheet' href='theme.css'>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<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'>
|
<input type='button' id='refreshFeed' value='Refresh Feed'>
|
||||||
<div id='feed'><span id='none'>None Yet :)</span></div>
|
<div id='feed'><span id='none'>None Yet :)</span></div>
|
||||||
|
<script src='/shared/misc.js'></script>
|
||||||
<script src='board.js'></script>
|
<script src='board.js'></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -26,7 +26,7 @@
|
||||||
<h2>Onionr Services</h2>
|
<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>
|
<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><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>
|
<br><br><hr>
|
||||||
<h2>Stats</h2>
|
<h2>Stats</h2>
|
||||||
<p>🕰️ Uptime: <span id='uptime'></span></p>
|
<p>🕰️ Uptime: <span id='uptime'></span></p>
|
||||||
|
|
Loading…
Reference in New Issue