Skip to content

Commit

Permalink
add asn link
Browse files Browse the repository at this point in the history
  • Loading branch information
jason5ng32 committed Nov 24, 2023
1 parent b4bc93c commit ae01aed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h2>🛜 IP 数据</h2>
<li class="list-group-item"><span class="jn-text">🗺️ 经纬度</span>: {{ card.latitude }}, {{ card.longitude
}}</li>
<li class="list-group-item"><span class="jn-text">🏢 ISP</span>: {{ card.isp }}</li>
<li class="list-group-item"><span class="jn-text">📶 ASN</span>: {{ card.asn }}</li>
<li class="list-group-item"><span class="jn-text">📶 ASN</span>: <a :href="card.asnlink" target="_blank">{{ card.asn }}</a></li>
</ul>
</div>

Expand Down
5 changes: 5 additions & 0 deletions res/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ new Vue({
longitude: '',
isp: '',
asn: '',
asnlink: '',
source: ''
},
{
Expand All @@ -24,6 +25,7 @@ new Vue({
longitude: '',
isp: '',
asn: '',
asnlink: '',
source: ''
}
],
Expand Down Expand Up @@ -136,6 +138,9 @@ new Vue({
card.isp = data.org || '';
card.asn = data.asn || '';

// 构造 AS Number 的链接
card.asnlink = `https://radar.cloudflare.com/traffic/${data.asn}`

// 构造 Google Maps iframe 的 URL
card.mapUrl = `https://www.google.com/maps?q=${data.latitude},${data.longitude}&z=2&output=embed`;

Expand Down

0 comments on commit ae01aed

Please sign in to comment.