fixed site loader and subdirs

This commit is contained in:
Kevin Froman 2019-11-13 21:06:04 -06:00
parent 0cce0f4318
commit 1166c9155a
3 changed files with 9 additions and 8 deletions

View file

@ -9,12 +9,12 @@ function checkHex(str) {
document.getElementById('openSite').onclick = function(){
var hash = document.getElementById('siteViewer').value
if (hash.length == 0){ return }
if (checkHex(hash) && hash.length >= 50){
if (checkHex(hash) && hash.length >= 50 || hash.length == 52 || hash.length == 56){
window.location.href = '/site/' + hash
}
else{
PNotify.notice({
text: 'Invalid site hash'
text: 'Invalid site hash/ID'
})
}
}