transport addresses now displays in dashboard
This commit is contained in:
parent
6c75c525d2
commit
817f0263db
3 changed files with 45 additions and 16 deletions
25
static-data/www/shared/main/loadTransport.js
Normal file
25
static-data/www/shared/main/loadTransport.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
fetch('/gettoraddress', {
|
||||
headers: {
|
||||
"token": webpass
|
||||
}})
|
||||
.then((resp) => resp.text())
|
||||
.then(function(resp) {
|
||||
let torBoxes = document.getElementsByClassName('myTor')
|
||||
Array.from(torBoxes).forEach(element => {
|
||||
element.value = resp
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
Array.from(document.getElementsByClassName('myTorCopy')).forEach(element => {
|
||||
element.onclick = function(){
|
||||
var copyText = document.getElementsByClassName('myTor')[0]
|
||||
copyText.select()
|
||||
document.execCommand("copy")
|
||||
if (typeof PNotify != 'undefined'){
|
||||
PNotify.success({
|
||||
text: "Copied to clipboard"
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue