Onionr/static-data/www/private/js/motd.js
2019-10-08 16:14:30 -05:00

13 lines
321 B
JavaScript

fetch('/getmotd', {
headers: {
"token": webpass
}})
.then((resp) => resp.text())
.then(function(resp) {
resp = resp.trim()
if (resp.length <= 1){return}
let motds = document.getElementsByClassName("motdContent")
for (x = 0; x < motds.length; x++){
motds[x].innerText = resp
}
})