Onionr/onionr/static-data/www/shared/sites.js
Kevin Froman 0405eda30e +added python info to version command
+uploads now have sessions
2019-09-19 18:43:06 -05:00

20 lines
436 B
JavaScript
Executable File

function checkHex(str) {
regexp = /^[0-9a-fA-F]+$/
if (regexp.test(str)){
return true
}
return false
}
document.getElementById('openSite').onclick = function(){
var hash = document.getElementById('siteViewer').value
if (checkHex(hash) && hash.length == 64){
window.location.href = '/site/' + hash
}
else{
PNotify.notice({
text: 'Invalid site hash'
})
}
}