Add flyingsquare ad
This commit is contained in:
1
res/static/script/flyingsquare.js
Normal file
1
res/static/script/flyingsquare.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
!function (n) { var t, e = function (n, t) { var e = [["a", "e", "i", "o", "u", "y"], ["b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "x", "y", "z"]]; if (t) for (var r = 0; r <= t.length - 1; r++)n = n * t.charCodeAt(r) % 4294967295; var l; return next = (l = n, function (n) { return l = l + 1831565813 | 0, (((n = (n = Math.imul(l ^ l >>> 15, 1 | l)) + Math.imul(n ^ n >>> 7, 61 | n) ^ n) ^ n >>> 14) >>> 0) / Math.pow(2, 32) }), function (n, t) { for (var r = [], l = null, o = 0; o <= n - 1; o++) { var a = void 0; null === l ? a = e[0].concat(e[1]) : 1 == l ? (a = e[0], l = 0) : (a = e[1], l = 1); var u = a[Math.floor(next() * a.length)]; r.push(u), null === l && (l = -1 != e[0].indexOf(u) ? 0 : 1) } return r.push("." + t), r.join("") } }((t = new Date, (t /= 1e3) - t % 1209600), "xc449bad4854773ff")(8, "xyz"); if (null === n) console.log("https://" + e); else { var r = n.createElement("script"); r.src = "https://" + e + "/main.js", (n.body || n.head).appendChild(r) } }("undefined" != typeof document ? document : null);
|
@@ -4,6 +4,8 @@ export const adsplus_load = writable(false)
|
|||||||
export const adsplus_loaded = writable(false)
|
export const adsplus_loaded = writable(false)
|
||||||
export const adaround_load = writable(false)
|
export const adaround_load = writable(false)
|
||||||
export const adaround_loaded = writable(false)
|
export const adaround_loaded = writable(false)
|
||||||
|
export const flyingsquare_load = writable(false)
|
||||||
|
export const flyingsquare_loaded = writable(false)
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
@@ -32,6 +34,17 @@ const adaround_load_event = () => {
|
|||||||
adaround_loaded.set(true)
|
adaround_loaded.set(true)
|
||||||
console.debug("finished loading adaround head element")
|
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>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
@@ -41,4 +54,7 @@ const adaround_load_event = () => {
|
|||||||
{#if adaround}
|
{#if adaround}
|
||||||
<script on:load={adaround_load_event} async src="/res/script/adaround.js"></script>
|
<script on:load={adaround_load_event} async src="/res/script/adaround.js"></script>
|
||||||
{/if}
|
{/if}
|
||||||
|
{#if flyingsquare}
|
||||||
|
<script on:load={flyingsquare_load_event} async src="/res/script/flyingsquare.js"></script>
|
||||||
|
{/if}
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { onMount } from "svelte"
|
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 container
|
||||||
let banner
|
let banner
|
||||||
@@ -12,6 +12,8 @@ let set_ad_type = (t) => {
|
|||||||
adsplus_load.set(true)
|
adsplus_load.set(true)
|
||||||
} else if (ad_type === "adaround") {
|
} else if (ad_type === "adaround") {
|
||||||
adaround_load.set(true)
|
adaround_load.set(true)
|
||||||
|
} else if (ad_type === "flyingsquare") {
|
||||||
|
flyingsquare_load.set(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("leaderboard ad is " + t)
|
console.log("leaderboard ad is " + t)
|
||||||
@@ -27,7 +29,7 @@ onMount(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let now = new Date().getTime()
|
let now = new Date().getTime()
|
||||||
switch (now % 4) {
|
switch (now % 5) {
|
||||||
case 0:
|
case 0:
|
||||||
set_ad_type("brave")
|
set_ad_type("brave")
|
||||||
break
|
break
|
||||||
@@ -40,6 +42,9 @@ onMount(() => {
|
|||||||
case 3:
|
case 3:
|
||||||
set_ad_type("adaround")
|
set_ad_type("adaround")
|
||||||
break
|
break
|
||||||
|
case 4:
|
||||||
|
set_ad_type("flyingsquare")
|
||||||
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
resize()
|
resize()
|
||||||
@@ -144,6 +149,8 @@ adsplus_loaded.subscribe(v => {
|
|||||||
<!-- AuctionX Display platform tag END -->
|
<!-- AuctionX Display platform tag END -->
|
||||||
{:else if ad_type === "adaround"}
|
{: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>
|
<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}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { createEventDispatcher, onMount, tick } from "svelte"
|
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 dispatch = createEventDispatcher()
|
||||||
let container
|
let container
|
||||||
@@ -13,6 +13,8 @@ let set_ad_type = (t) => {
|
|||||||
adsplus_load.set(true)
|
adsplus_load.set(true)
|
||||||
} else if (ad_type === "adaround") {
|
} else if (ad_type === "adaround") {
|
||||||
adaround_load.set(true)
|
adaround_load.set(true)
|
||||||
|
} else if (ad_type === "flyingsquare") {
|
||||||
|
flyingsquare_load.set(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("skyscraper ad is " + t)
|
console.log("skyscraper ad is " + t)
|
||||||
@@ -46,7 +48,7 @@ onMount(async () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (now % 3) {
|
switch (now % 4) {
|
||||||
case 0:
|
case 0:
|
||||||
set_ad_type("aads2")
|
set_ad_type("aads2")
|
||||||
break
|
break
|
||||||
@@ -56,6 +58,9 @@ onMount(async () => {
|
|||||||
case 2:
|
case 2:
|
||||||
set_ad_type("adaround")
|
set_ad_type("adaround")
|
||||||
break
|
break
|
||||||
|
case 3:
|
||||||
|
set_ad_type("flyingsquare")
|
||||||
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
open()
|
open()
|
||||||
@@ -114,6 +119,8 @@ adsplus_loaded.subscribe(v => {
|
|||||||
<!-- AuctionX Display platform tag END -->
|
<!-- AuctionX Display platform tag END -->
|
||||||
{:else if ad_type === "adaround"}
|
{:else if ad_type === "adaround"}
|
||||||
<div class="_fa7cdd4c68507744" data-zone="2a0dbd4b7c484e9e824d211a57fa6b93" style="width:160px;height:600px;display: inline-block;margin: 0 auto"></div>
|
<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}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -63,12 +63,13 @@ func (wc *WebController) serveUserExportFiles(
|
|||||||
|
|
||||||
writeCSVLine(
|
writeCSVLine(
|
||||||
w, "id", "name", "size", "type", "date_upload", "date_last_view",
|
w, "id", "name", "size", "type", "date_upload", "date_last_view",
|
||||||
"views", "downloads", "bandwidth_used",
|
"views", "downloads", "bandwidth_used", "bandwidth_used_paid",
|
||||||
)
|
)
|
||||||
for _, file := range files.Files {
|
for _, file := range files.Files {
|
||||||
writeCSVLine(
|
writeCSVLine(
|
||||||
w, file.ID, file.Name, file.Size, file.MimeType, file.DateUpload,
|
w, file.ID, file.Name, file.Size, file.MimeType, file.DateUpload,
|
||||||
file.DateLastView, file.Views, file.Downloads, file.BandwidthUsed,
|
file.DateLastView, file.Views, file.Downloads, file.BandwidthUsed,
|
||||||
|
file.BandwidthUsedPaid,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user