Skip to content

Commit

Permalink
Merge pull request jason5ng32#112 from jason5ng32/dev
Browse files Browse the repository at this point in the history
Update .env.example
  • Loading branch information
jason5ng32 authored Feb 20, 2024
2 parents c504b11 + bfffc8e commit d63103d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ ALLOWED_DOMAINS=""
IPINFO_API_TOKEN=""
KEYCDN_USER_AGENT=""
IPChecking_API_KEY=""
CLOUDFLARE_API=""
CLOUDFLARE_API=""
VITE_RECAPTCHA_SITE_KEY=""
RECAPTCHA_SECRET_KEY=""
1 change: 1 addition & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ export default {
keys: "q",
action: () => {
this.openModal("IPCheck");
this.$refs.queryIPRef.loadRecaptchaScript();
this.$trackEvent('ShortCut', 'ShortCut', 'QueryIP');
},
description: this.$t('shortcutKeys.IPCheck'),
Expand Down
3 changes: 3 additions & 0 deletions src/components/queryip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ export default {
// 加载 reCAPTCHA 脚本
loadRecaptchaScript() {
if (this.reCaptchaEnabled === false || this.reCaptchaLoaded === true) {
return;
}
// 创建一个 script 元素
const script = document.createElement('script');
script.src = `https://www.recaptcha.net/recaptcha/api.js?render=${import.meta.env.VITE_RECAPTCHA_SITE_KEY}`;
Expand Down

0 comments on commit d63103d

Please sign in to comment.