moved static data one directory up
This commit is contained in:
parent
e4df34ef29
commit
09f6735961
124 changed files with 27 additions and 54 deletions
20
static-data/www/shared/sites.js
Executable file
20
static-data/www/shared/sites.js
Executable file
|
@ -0,0 +1,20 @@
|
|||
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 (hash.length == 0){ return }
|
||||
if (checkHex(hash) && hash.length >= 50){
|
||||
window.location.href = '/site/' + hash
|
||||
}
|
||||
else{
|
||||
PNotify.notice({
|
||||
text: 'Invalid site hash'
|
||||
})
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue