show message if user tries to open .onion as onionr site
This commit is contained in:
parent
68aac2153b
commit
e19e23022b
@ -34,7 +34,7 @@ var getRecent = function(){
|
||||
if (existing.includes(key)){
|
||||
return
|
||||
}
|
||||
existing = key + " - " + value + "\n" + existing
|
||||
existing = "\n" + key + " - " + value + "\n" + existing
|
||||
})
|
||||
document.getElementsByClassName('recentBlockList')[0].innerText = existing
|
||||
console.debug(data)
|
||||
|
@ -25,7 +25,13 @@ function checkHex(str) {
|
||||
}
|
||||
|
||||
document.getElementById('openSite').onclick = function(){
|
||||
var hash = document.getElementById('siteViewer').value
|
||||
var hash = document.getElementById('siteViewer').value.trim()
|
||||
if (hash.includes('.onion')){
|
||||
PNotify.notice({
|
||||
text: 'This is for Onionr sites, not Tor onion services.'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (hash.length == 0){ return }
|
||||
if (checkHex(hash) && hash.length >= 50 || hash.length == 52 || hash.length == 56){
|
||||
window.location.href = '/site/' + hash
|
||||
|
Loading…
Reference in New Issue
Block a user