-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
302 additions
and
890 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<template> | ||
<!-- | ||
We're testing the possibility of using some different ads. If you don't like ads, then you | ||
can use an ad blocker. Plus you could donate to us at https://www.ilovefreegle.org/donate - if we got | ||
enough donations we would be delighted not to show ads. | ||
--> | ||
<div :ref="uniqueid" class="d-flex justify-content-end pb-2"> | ||
<div :id="uniqueid" style="min-width: 300px; min-height: 250px" /> | ||
</div> | ||
</template> | ||
<script setup> | ||
import { ref, onMounted, onBeforeUnmount } from '#imports' | ||
import { waitForRef } from '~/composables/useWaitForRef' | ||
// This must match what has been set up in GPT admin. | ||
const uniqueid = ref('div-gpt-ad-1610613658342-0') | ||
const p = new Promise((resolve, reject) => { | ||
const already = document.getElementById('gpt-script') | ||
if (already) { | ||
console.log('Script already there') | ||
resolve() | ||
} else { | ||
const s = document.createElement('script') | ||
s.setAttribute( | ||
'src', | ||
'https://securepubads.g.doubleclick.net/tag/js/gpt.js' | ||
) | ||
s.id = 'gpt-script' | ||
s.onload = () => resolve() | ||
document.head.appendChild(s) | ||
} | ||
}) | ||
await p | ||
let slot = null | ||
onMounted(async () => { | ||
await waitForRef(uniqueid) | ||
window.googletag = window.googletag || { cmd: [] } | ||
window.googletag.cmd.push(function () { | ||
slot = window.googletag | ||
.defineSlot('/22794232631/freegle_test1', [300, 250], uniqueid.value) | ||
.addService(window.googletag.pubads()) | ||
window.googletag.pubads().enableSingleRequest() | ||
window.googletag.enableServices() | ||
}) | ||
window.googletag.cmd.push(function () { | ||
window.googletag.display(uniqueid.value) | ||
console.log('Displayed slot', uniqueid.value) | ||
}) | ||
}) | ||
onBeforeUnmount(() => { | ||
console.log('Destroy slot', uniqueid.value) | ||
if (window.googletag?.destroySlots) { | ||
window.googletag.destroySlots([slot]) | ||
} | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,5 +34,5 @@ export default { | |
'https://[email protected]/4504083802226688', | ||
|
||
ISAPP: process.env.IZNIK_NUXT3_IS_APP === 'true', | ||
MOBILE_VERSION: '3.0.5', | ||
MOBILE_VERSION: '3.0.6', | ||
} |
Oops, something went wrong.