Add flyingsquare ad
This commit is contained in:
@@ -4,6 +4,8 @@ export const adsplus_load = writable(false)
|
||||
export const adsplus_loaded = writable(false)
|
||||
export const adaround_load = writable(false)
|
||||
export const adaround_loaded = writable(false)
|
||||
export const flyingsquare_load = writable(false)
|
||||
export const flyingsquare_loaded = writable(false)
|
||||
|
||||
</script>
|
||||
<script>
|
||||
@@ -32,6 +34,17 @@ const adaround_load_event = () => {
|
||||
adaround_loaded.set(true)
|
||||
console.debug("finished loading adaround head element")
|
||||
}
|
||||
|
||||
let flyingsquare = false
|
||||
flyingsquare_load.subscribe(v => {
|
||||
if (v) {
|
||||
flyingsquare = true
|
||||
}
|
||||
})
|
||||
const flyingsquare_load_event = () => {
|
||||
flyingsquare_loaded.set(true)
|
||||
console.debug("finished loading flyingsquare head element")
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@@ -41,4 +54,7 @@ const adaround_load_event = () => {
|
||||
{#if adaround}
|
||||
<script on:load={adaround_load_event} async src="/res/script/adaround.js"></script>
|
||||
{/if}
|
||||
{#if flyingsquare}
|
||||
<script on:load={flyingsquare_load_event} async src="/res/script/flyingsquare.js"></script>
|
||||
{/if}
|
||||
</svelte:head>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<script>
|
||||
import { onMount } from "svelte"
|
||||
import { adsplus_load, adsplus_loaded, adaround_load } from "./AdHead.svelte"
|
||||
import { adsplus_load, adsplus_loaded, adaround_load, flyingsquare_load } from "./AdHead.svelte"
|
||||
|
||||
let container
|
||||
let banner
|
||||
@@ -12,6 +12,8 @@ let set_ad_type = (t) => {
|
||||
adsplus_load.set(true)
|
||||
} else if (ad_type === "adaround") {
|
||||
adaround_load.set(true)
|
||||
} else if (ad_type === "flyingsquare") {
|
||||
flyingsquare_load.set(true)
|
||||
}
|
||||
|
||||
console.log("leaderboard ad is " + t)
|
||||
@@ -27,7 +29,7 @@ onMount(() => {
|
||||
}
|
||||
|
||||
let now = new Date().getTime()
|
||||
switch (now % 4) {
|
||||
switch (now % 5) {
|
||||
case 0:
|
||||
set_ad_type("brave")
|
||||
break
|
||||
@@ -40,6 +42,9 @@ onMount(() => {
|
||||
case 3:
|
||||
set_ad_type("adaround")
|
||||
break
|
||||
case 4:
|
||||
set_ad_type("flyingsquare")
|
||||
break
|
||||
}
|
||||
|
||||
resize()
|
||||
@@ -144,6 +149,8 @@ adsplus_loaded.subscribe(v => {
|
||||
<!-- AuctionX Display platform tag END -->
|
||||
{:else if ad_type === "adaround"}
|
||||
<div bind:this={banner} class="_fa7cdd4c68507744 banner" data-zone="d8764be36c134d3d807abb2a073dc010" style="width:728px;height:90px;display: inline-block;margin: 0 auto"></div>
|
||||
{:else if ad_type === "flyingsquare"}
|
||||
<div bind:this={banner} class="xc449bad4854773ff banner" data-zone="28ebf286bb7d4446a5ba43b0ead8f1bb" style="width:728px;height:90px;display: inline-block;margin: 0 auto"></div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<script>
|
||||
import { createEventDispatcher, onMount, tick } from "svelte"
|
||||
import { adsplus_load, adsplus_loaded, adaround_load } from "./AdHead.svelte"
|
||||
import { adsplus_load, adsplus_loaded, adaround_load, flyingsquare_load } from "./AdHead.svelte"
|
||||
|
||||
let dispatch = createEventDispatcher()
|
||||
let container
|
||||
@@ -13,6 +13,8 @@ let set_ad_type = (t) => {
|
||||
adsplus_load.set(true)
|
||||
} else if (ad_type === "adaround") {
|
||||
adaround_load.set(true)
|
||||
} else if (ad_type === "flyingsquare") {
|
||||
flyingsquare_load.set(true)
|
||||
}
|
||||
|
||||
console.log("skyscraper ad is " + t)
|
||||
@@ -46,7 +48,7 @@ onMount(async () => {
|
||||
return
|
||||
}
|
||||
|
||||
switch (now % 3) {
|
||||
switch (now % 4) {
|
||||
case 0:
|
||||
set_ad_type("aads2")
|
||||
break
|
||||
@@ -56,6 +58,9 @@ onMount(async () => {
|
||||
case 2:
|
||||
set_ad_type("adaround")
|
||||
break
|
||||
case 3:
|
||||
set_ad_type("flyingsquare")
|
||||
break
|
||||
}
|
||||
|
||||
open()
|
||||
@@ -114,6 +119,8 @@ adsplus_loaded.subscribe(v => {
|
||||
<!-- AuctionX Display platform tag END -->
|
||||
{:else if ad_type === "adaround"}
|
||||
<div class="_fa7cdd4c68507744" data-zone="2a0dbd4b7c484e9e824d211a57fa6b93" style="width:160px;height:600px;display: inline-block;margin: 0 auto"></div>
|
||||
{:else if ad_type === "flyingsquare"}
|
||||
<div class="xc449bad4854773ff" data-zone="d675792db61d408287d0d694d03d12e5" style="width:160px;height:600px;display: inline-block;margin: 0 auto"></div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user