Skip to content

Commit

Permalink
Removed duplicate ads
Browse files Browse the repository at this point in the history
  • Loading branch information
elrumo committed Apr 1, 2021
1 parent b80a160 commit 853e532
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 22 deletions.
1 change: 1 addition & 0 deletions website/macos-big-sur-icons/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:submitIconDialog="'submitIcon'"
/>
<router-view
:key="$route.fullPath"
class="min-height"
/>
<Footer/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
Sponsored by
</p>

<NativeAd/>
<NativeAd :key="$route.fullPath + 'ad'"/>
<!-- <div class="" id="iconbar-js"></div> -->
</div>
<!-- <div class="text-and-ad-wrapper">
Expand Down
4 changes: 2 additions & 2 deletions website/macos-big-sur-icons/src/components/Hero.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<!-- <p class="coral-Body--XS">
Sponsored by
</p> -->
<NativeAd/>
<NativeAd :key="$route.fullPath + 'ad'"/>
</div>

<div class="desktop-hidden m-t-20"></div>
Expand All @@ -30,7 +30,7 @@
<span class="f-w-100 f-s-26">macOS Big Sur</span>
<br />
<!-- The Icons Page -->
Free app icons
<strike>Free</strike> Paid app icons
</h1>

<p class="coral-Body--L w-100 body-text">
Expand Down
2 changes: 1 addition & 1 deletion website/macos-big-sur-icons/src/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
<!-- Loading error -->
<div v-if="loadingError" class="waiting-wrapper">

<NativeAd/>
<NativeAd :key="$route.fullPath + 'ad'"/>
<h3 class="coral-Heading--M">
The site is temporarily down for maintenance purposes.
<br>
Expand Down
29 changes: 13 additions & 16 deletions website/macos-big-sur-icons/src/components/NativeAd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<p v-if="sponsored" class="coral-Detail coral-Detail--S coral-Detail--light opacity-50">
Sponsored
</p>
<div @click="adClick" class="" id="iconbar-js"></div>
<div @click="adClick" class="" id="iconbar-js">
</div>
</div>
</template>

Expand All @@ -23,12 +24,11 @@ export default {
return{
}
},
mounted: function(){
function getAd(){
console.log("_bsa");
if (typeof _bsa !== 'undefined' && _bsa) {
function getAd(el){
if (typeof _bsa !== 'undefined' && !_bsa.exists(el)) {
_bsa.init('custom', 'CESDC2QN', 'placement:macosiconscom',
{
target: '#iconbar-js',
Expand All @@ -40,22 +40,19 @@ export default {
`
}
);
let el = document.getElementById("customAd")
console.log(el);
// if (!el) {
// console.log(el);
// }
}
}
getAd()
let el = document.getElementById("customAd")
console.log(_bsa.testData);
getAd(el)
setTimeout(() =>{
let el = document.getElementById("customAd")
if (!_bsa.exists(el)) {
getAd()
}
}, 800)
console.log(_bsa.exists(el));
getAd(el)
_bsa.reload("#iconbar-js")
// }
}, 1800)
},
methods:{
Expand Down
1 change: 1 addition & 0 deletions website/macos-big-sur-icons/src/views/BlogPost.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<NativeAd
:sponsored="true"
:fullWidth="true"
:key="$route.fullPath + 'ad'"
/>
</div>

Expand Down
3 changes: 1 addition & 2 deletions website/macos-big-sur-icons/src/views/HowTo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ export default {
]
},
mounted: function(){
console.log(this.$metaInfo);
mounted: function(){
},
data(){
Expand Down
1 change: 1 addition & 0 deletions website/macos-big-sur-icons/src/views/ResourceView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<NativeAd
class="m-t-20"
sponsored="true"
:key="$route.fullPath + 'ad'"
/>
</div>

Expand Down

1 comment on commit 853e532

@vercel
Copy link

@vercel vercel bot commented on 853e532 Apr 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.