File tree Expand file tree Collapse file tree
docs/.vuepress/layouts/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66import { isNullish } from ' @sapphire/utilities'
77import { onMounted , ref , watch } from ' vue'
88import { useRoute } from ' vue-router'
9+ import Demo from ' ../../components/Demo/Demo.vue' ;
910
1011const SCRIPT_ID = ' _carbonads_js'
1112const ACCOUNT_ID = ' CE7IC27U'
@@ -16,18 +17,18 @@ const route = useRoute()
1617const carbonAdsElementRef = ref <HTMLDivElement >()
1718
1819async function loadCarbonAds() {
19- console .log (" loadCarbonAds" )
2020 const s = document .createElement (' script' )
2121 s .id = SCRIPT_ID
2222 s .src = ` //cdn.carbonads.com/carbon.js?serve=${ACCOUNT_ID }&placement=${PLACEMENT } `
2323 carbonAdsElementRef ?.value ?.appendChild (s )
2424}
2525
26+ let hash = ' ' ;
2627onMounted (() => {
28+ hash = window .location .hash
2729 loadCarbonAds ()
2830})
2931
30- let hash = window .location .hash
3132watch (route , (to , from ) => {
3233 if (! isNullish (document .querySelector (' #carbonads' ))) {
3334 if (window .location .hash == hash ) {
You can’t perform that action at this time.
0 commit comments