Skip to content

Commit

Permalink
Add Google Maps link
Browse files Browse the repository at this point in the history
  • Loading branch information
jason5ng32 committed Nov 23, 2023
1 parent 0415af8 commit 1a6888e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<title>IP 状态查看</title>
<link rel="stylesheet" href="res/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.5.0/css/flag-icon.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="IP 状态查看">
<meta name="keywords" content="IP 状态查看">
Expand Down Expand Up @@ -42,7 +43,7 @@ <h1>IP 状态查看</h1>
<h4 id="ipTitle">国内 IP</h4>
</div>
<div class="col text-right">
<a href="javascript:getIPFromTaobao()" class="btn btn-primary">刷新</a>
<a href="javascript:getIPFromTaobao()" class="btn btn-light"><i class="bi bi-arrow-clockwise"></i></a>
</div>
</div>
<div id="result_0"></div>
Expand All @@ -53,7 +54,7 @@ <h4 id="ipTitle">国内 IP</h4>
<h4>国外 IP</h4>
</div>
<div class="col text-right">
<a href="javascript:getIPFromIpapi()" class="btn btn-primary">刷新</a>
<a href="javascript:getIPFromIpapi()" class="btn btn-light"><i class="bi bi-arrow-clockwise"></i></a>
</div>
</div>
<div id="result_1"></div>
Expand All @@ -64,7 +65,7 @@ <h4>国外 IP</h4>
<h4>可用性检测</h4>
</div>
<div class="col text-right">
<a href="javascript:checkConnectivity()" class="btn btn-primary">刷新</a>
<a href="javascript:checkConnectivity()" class="btn btn-light"><i class="bi bi-arrow-clockwise"></i></a>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion res/ipinfos.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function displayIpapiResult(divIndex, data, tableClass) {
dataCell.textContent = data.city;
break;
case 4:
dataCell.textContent = data.latitude + ', ' + data.longitude;
dataCell.innerHTML = data.latitude + ', ' + data.longitude + ' ' + '<a href="https://www.google.com/maps/search/?api=1&query=' + data.latitude + ',' + data.longitude + '" target="_blank" title="Google 地图"><i class="bi bi-geo-fill"></i></a>';
break;
case 5:
dataCell.textContent = data.org;
Expand Down

0 comments on commit 1a6888e

Please sign in to comment.