From c381d81f3917294368560922393128faae3f9107 Mon Sep 17 00:00:00 2001 From: William Chong Date: Sun, 15 Dec 2024 03:16:13 +0800 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Use=20module=20for=20adsen?= =?UTF-8?q?se?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nuxt.config.ts | 31 ++++++++++++++++++------------- package.json | 1 + yarn.lock | 37 ++++++++++++++++++++++++++++++++++--- 3 files changed, 53 insertions(+), 16 deletions(-) diff --git a/nuxt.config.ts b/nuxt.config.ts index c14808e..c2b9fa4 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -2,16 +2,14 @@ export default defineNuxtConfig({ app: { head: { - title: 'CBOR to JSON Online Converter', + title: "CBOR to JSON Online Converter", meta: [ - { name: 'og:title', content: 'CBOR to JSON Online Converter' }, - { name: 'description', content: 'Easily convert data between CBOR (Concise Binary Object Representation) and JSON (JavaScript Object Notation) formats with this online web decoder.' } - ], - link: [ - { rel: 'preload', as: 'script', href: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5384552213891537', crossorigin: 'anonymous' }, - ], - script: [ - { src: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5384552213891537', async: true, crossorigin: 'anonymous', body: true }, + { name: "og:title", content: "CBOR to JSON Online Converter" }, + { + name: "description", + content: + "Easily convert data between CBOR (Concise Binary Object Representation) and JSON (JavaScript Object Notation) formats with this online web decoder.", + }, ], }, }, @@ -19,10 +17,9 @@ export default defineNuxtConfig({ scripts: { registry: { googleAnalytics: { - id: 'G-PG6KXFFZPF', + id: "G-PG6KXFFZPF", }, - - } + }, }, devtools: { enabled: true }, @@ -31,5 +28,13 @@ export default defineNuxtConfig({ clientNodeCompat: true, }, - modules: ["@nuxt/scripts"] + modules: [ + "@nuxt/scripts", + [ + "@nuxtjs/google-adsense", + { + id: "ca-pub-5384552213891537", + }, + ], + ], }); diff --git a/package.json b/package.json index b06688f..254e450 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ }, "dependencies": { "@nuxt/scripts": "^0.9.5", + "@nuxtjs/google-adsense": "^3.0.0", "cbor-x": "^1.6.0", "nuxt": "^3.14.1592", "vue": "latest" diff --git a/yarn.lock b/yarn.lock index 41ee7f5..a220297 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1220,7 +1220,7 @@ which "^3.0.1" ws "^8.18.0" -"@nuxt/kit@3.14.1592", "@nuxt/kit@^3.13.1", "@nuxt/kit@^3.13.2", "@nuxt/kit@^3.14.1592": +"@nuxt/kit@3.14.1592", "@nuxt/kit@^3.13.1", "@nuxt/kit@^3.13.2", "@nuxt/kit@^3.14.1592", "@nuxt/kit@^3.6.5": version "3.14.1592" resolved "https://registry.yarnpkg.com/@nuxt/kit/-/kit-3.14.1592.tgz#f959a269424c1ee313585a46112e474b6ccab3bc" integrity sha512-r9r8bISBBisvfcNgNL3dSIQHSBe0v5YkX5zwNblIC2T0CIEgxEVoM5rq9O5wqgb5OEydsHTtT2hL57vdv6VT2w== @@ -1363,6 +1363,15 @@ vite-plugin-checker "^0.8.0" vue-bundle-renderer "^2.1.1" +"@nuxtjs/google-adsense@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@nuxtjs/google-adsense/-/google-adsense-3.0.0.tgz#e51317f2344e5c7ac9ac13a9564eabf88a8bc406" + integrity sha512-fR1rbj6mnfBCWMkVSocPUYX11rGzTwSs1v2sajG6wtXGjXLGRjJSFKSynYHdwO3V4o4xRvtve0W/Db96eiTKmA== + dependencies: + "@nuxt/kit" "^3.6.5" + "@vueuse/core" "^10.4.1" + defu "^6.1.2" + "@parcel/watcher-android-arm64@2.4.1": version "2.4.1" resolved "https://registry.yarnpkg.com/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.4.1.tgz#c2c19a3c442313ff007d2d7a9c2c1dd3e1c9ca84" @@ -2504,6 +2513,16 @@ "@vueuse/shared" "12.0.0" vue "^3.5.13" +"@vueuse/core@^10.4.1": + version "10.11.1" + resolved "https://registry.yarnpkg.com/@vueuse/core/-/core-10.11.1.tgz#15d2c0b6448d2212235b23a7ba29c27173e0c2c6" + integrity sha512-guoy26JQktXPcz+0n3GukWIy/JDNKti9v6VEMu6kV2sYBsWuGiTU8OWdg+ADfUbHg3/3DlqySDe7JmdHrktiww== + dependencies: + "@types/web-bluetooth" "^0.0.20" + "@vueuse/metadata" "10.11.1" + "@vueuse/shared" "10.11.1" + vue-demi ">=0.14.8" + "@vueuse/core@^11.1.0": version "11.3.0" resolved "https://registry.yarnpkg.com/@vueuse/core/-/core-11.3.0.tgz#bb0bd1f0edd5435d20694dbe51091cf548653a4d" @@ -2523,6 +2542,11 @@ "@vueuse/shared" "12.0.0" vue "^3.5.13" +"@vueuse/metadata@10.11.1": + version "10.11.1" + resolved "https://registry.yarnpkg.com/@vueuse/metadata/-/metadata-10.11.1.tgz#209db7bb5915aa172a87510b6de2ca01cadbd2a7" + integrity sha512-IGa5FXd003Ug1qAZmyE8wF3sJ81xGLSqTqtQ6jaVfkeZ4i5kS2mwQF61yhVqojRnenVew5PldLyRgvdl4YYuSw== + "@vueuse/metadata@11.3.0": version "11.3.0" resolved "https://registry.yarnpkg.com/@vueuse/metadata/-/metadata-11.3.0.tgz#be7ac12e3016c0353a3667b372a73aeeee59194e" @@ -2544,6 +2568,13 @@ local-pkg "^0.5.1" vue "^3.5.13" +"@vueuse/shared@10.11.1": + version "10.11.1" + resolved "https://registry.yarnpkg.com/@vueuse/shared/-/shared-10.11.1.tgz#62b84e3118ae6e1f3ff38f4fbe71b0c5d0f10938" + integrity sha512-LHpC8711VFZlDaYUXEBbFBCQ7GS3dVU9mjOhhMhXP6txTV4EhYQg/KGnQuvt/sPAtoUKq7VVUnL6mVtFoL42sA== + dependencies: + vue-demi ">=0.14.8" + "@vueuse/shared@11.3.0": version "11.3.0" resolved "https://registry.yarnpkg.com/@vueuse/shared/-/shared-11.3.0.tgz#086a4f35bf5bcec5655a03b80eae582605a4b21d" @@ -3343,7 +3374,7 @@ define-lazy-prop@^3.0.0: resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz#dbb19adfb746d7fc6d734a06b72f4a00d021255f" integrity sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg== -defu@^6.1.3, defu@^6.1.4: +defu@^6.1.2, defu@^6.1.3, defu@^6.1.4: version "6.1.4" resolved "https://registry.yarnpkg.com/defu/-/defu-6.1.4.tgz#4e0c9cf9ff68fe5f3d7f2765cc1a012dfdcb0479" integrity sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg== @@ -6736,7 +6767,7 @@ vue-bundle-renderer@^2.1.1: dependencies: ufo "^1.5.4" -vue-demi@>=0.14.10: +vue-demi@>=0.14.10, vue-demi@>=0.14.8: version "0.14.10" resolved "https://registry.yarnpkg.com/vue-demi/-/vue-demi-0.14.10.tgz#afc78de3d6f9e11bf78c55e8510ee12814522f04" integrity sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==