chore(ui): use innerText instead of innerHTML
This commit is contained in:
parent
c38133fd6c
commit
ae370e8a62
2 changed files with 18 additions and 18 deletions
18
flake.lock
18
flake.lock
|
@ -7,11 +7,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726560853,
|
||||
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -22,11 +22,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1730272153,
|
||||
"narHash": "sha256-B5WRZYsRlJgwVHIV6DvidFN7VX7Fg9uuwkRW9Ha8z+w=",
|
||||
"lastModified": 1731890469,
|
||||
"narHash": "sha256-D1FNZ70NmQEwNxpSSdTXCSklBH1z2isPR84J6DQrJGs=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2d2a9ddbe3f2c00747398f3dc9b05f7f2ebb0f53",
|
||||
"rev": "5083ec887760adfe12af64830a66807423a859a7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -66,11 +66,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730321837,
|
||||
"narHash": "sha256-vK+a09qq19QNu2MlLcvN4qcRctJbqWkX7ahgPZ/+maI=",
|
||||
"lastModified": 1732187120,
|
||||
"narHash": "sha256-XdW2mYXvPHYtZ8oQqO3tRYtxx7kI0Hs3NU64IwAtD68=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "746901bb8dba96d154b66492a29f5db0693dbfcc",
|
||||
"rev": "37f8f47cb618eddee0c0dd31a582b1cd3013c7f6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
async function main() {
|
||||
async function main(): Promise<void> {
|
||||
fetch("https://ip.ny4.dev/api/v1/ip")
|
||||
.then((response) => {
|
||||
if (!response.ok) {
|
||||
|
@ -7,8 +7,8 @@ async function main() {
|
|||
return response.json();
|
||||
})
|
||||
.then((data) => {
|
||||
document.getElementById("check-ny4-ip")!.innerHTML = data.ip;
|
||||
document.getElementById("check-ny4-location")!.innerHTML = [
|
||||
document.getElementById("check-ny4-ip")!.innerText = data.ip;
|
||||
document.getElementById("check-ny4-location")!.innerText = [
|
||||
data.city,
|
||||
data.region,
|
||||
data.country,
|
||||
|
@ -25,8 +25,8 @@ async function main() {
|
|||
return response.json();
|
||||
})
|
||||
.then((data) => {
|
||||
document.getElementById("check-ipsb-ip")!.innerHTML = data.ip;
|
||||
document.getElementById("check-ipsb-location")!.innerHTML = [
|
||||
document.getElementById("check-ipsb-ip")!.innerText = data.ip;
|
||||
document.getElementById("check-ipsb-location")!.innerText = [
|
||||
data.city,
|
||||
data.region,
|
||||
data.country,
|
||||
|
@ -43,8 +43,8 @@ async function main() {
|
|||
return response.json();
|
||||
})
|
||||
.then((data) => {
|
||||
document.getElementById("check-ipapiis-ip")!.innerHTML = data.ip;
|
||||
document.getElementById("check-ipapiis-location")!.innerHTML = [
|
||||
document.getElementById("check-ipapiis-ip")!.innerText = data.ip;
|
||||
document.getElementById("check-ipapiis-location")!.innerText = [
|
||||
data.location.city,
|
||||
data.location.state,
|
||||
data.location.country,
|
||||
|
@ -62,8 +62,8 @@ async function main() {
|
|||
})
|
||||
.then((data) => {
|
||||
const v = data.data;
|
||||
document.getElementById("check-speedtestcn-ip")!.innerHTML = v.ip;
|
||||
document.getElementById("check-speedtestcn-location")!.innerHTML = [
|
||||
document.getElementById("check-speedtestcn-ip")!.innerText = v.ip;
|
||||
document.getElementById("check-speedtestcn-location")!.innerText = [
|
||||
v.city,
|
||||
v.province,
|
||||
v.country,
|
||||
|
|
Loading…
Reference in a new issue