Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
jason5ng32 committed Dec 26, 2023
1 parent 01ce804 commit 4290220
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
2 changes: 2 additions & 0 deletions public/contents/lang_cn.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ export default {
page: {
title:
"查看我的 IP 地址 | 查询本机 IP 地址及归属地 | 查看 WebRTC 连接 IP | DNS 泄露检测 | 网速测试 | Jason Ng 阿禅开源作品",
description:"一个更好的 IP 工具箱。轻松查看你的 IP 地址,IP 信息,检查 DNS 泄露,检查 WebRTC 连接,以及测试网站可用性",
keywords:"我的IP,IP工具,我的IP,IP查询,DNS泄漏测试,WebRTC测试,网速测试",
footerName: "Creators: Jason Ng, Seven Yu & ChatGPT",
footerLink: "https://github.com/jason5ng32/MyIP",
},
Expand Down
2 changes: 2 additions & 0 deletions public/contents/lang_en.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ export default {
page: {
title:
"Check My IP Address and Geolocation | Check WebRTC Connection IP | DNS Leak Test | Speed Test | Jason Ng Open Source",
description:"A better IP Toolbox. Easy to check what's your IPs, IP informations, check for DNS leaks, examine WebRTC connections, and test website availability",
keywords:"MyIP,IP Tool,My IP,IP check,IP lookup,DNS leak test,WebRTC test,Speed test",
footerName: "Creators: Jason Ng, Seven Yu & ChatGPT",
footerLink: "https://github.com/jason5ng32/MyIP",
},
Expand Down
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="IP,IP查询,IP地址查询,IP地址,IP地址归属地,查询本机IP,网速测试">
<meta name="keywords" content="MyIP,IP Tool,My IP,IP check,IP lookup,DNS leak test,WebRTC test,Speed test">
<meta name="description"
content="A better IP Toolbox. Easy to check what's your IPs, IP informations, check for DNS leaks, examine WebRTC connections, and test website availability">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#f8f9fa">
<meta name="background-color" content="#ffffff">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="apple-touch-icon" href="res/img/logo-512.png">
<title>查看我的 IP 地址 | 查询本机 IP 地址及归属地 | 查看 WebRTC 连接 IP DNS 泄露检测 | 网速测试 | Jason Ng 阿禅开源作品 </title>
<title>Check My IP Address and Geolocation | Check WebRTC Connection IP | DNS Leak Test | Speed Test | Jason Ng Open Source </title>
<!-- Bootstrap CSS -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
Expand Down
14 changes: 13 additions & 1 deletion public/res/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,19 @@ new Vue({
}
},
updatePageTitle(lang) {
document.title = this.currentTexts.page.title;
this.$nextTick(() => {
document.title = this.currentTexts.page.title;

const metaDescription = document.querySelector('meta[name="description"]');
if (metaDescription) {
metaDescription.setAttribute('content', this.currentTexts.page.description);
}

const metaKeywords = document.querySelector('meta[name="keywords"]');
if (metaKeywords) {
metaKeywords.setAttribute('content', this.currentTexts.page.keywords);
}
});
},

// 手动设置语言
Expand Down

0 comments on commit 4290220

Please sign in to comment.