mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-08-28 19:48:01 +08:00
feat: |UI| support google ads (#592)
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { darkTheme, NGlobalStyle, zhCN } from 'naive-ui'
|
import { darkTheme, NGlobalStyle, zhCN } from 'naive-ui'
|
||||||
import { computed, onMounted } from 'vue'
|
import { computed, onMounted } from 'vue'
|
||||||
|
import { useScript } from '@unhead/vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { useGlobalState } from './store'
|
import { useGlobalState } from './store'
|
||||||
import { useIsMobile } from './utils/composables'
|
import { useIsMobile } from './utils/composables'
|
||||||
@@ -37,6 +38,17 @@ onMounted(async () => {
|
|||||||
document.body.appendChild(script);
|
document.body.appendChild(script);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check if google ad is enabled
|
||||||
|
const adClientID = import.meta.env.VITE_GOOGLE_AD_CLIENT_ID;
|
||||||
|
if (adClientID) {
|
||||||
|
useScript({
|
||||||
|
src: `https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=${adClientID}`,
|
||||||
|
async: true,
|
||||||
|
crossorigin: "anonymous",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// check if telegram is enabled
|
// check if telegram is enabled
|
||||||
const enableTelegram = import.meta.env.VITE_IS_TELEGRAM;
|
const enableTelegram = import.meta.env.VITE_IS_TELEGRAM;
|
||||||
if (
|
if (
|
||||||
|
|||||||
Reference in New Issue
Block a user