Skip to content

Commit

Permalink
Removed duplicate ad
Browse files Browse the repository at this point in the history
  • Loading branch information
elrumo committed Apr 2, 2021
1 parent c0f7f3f commit 1e54fdb
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions website/macos-big-sur-icons/src/components/NativeAd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default {
let parent = this
function getAd(el){
if (typeof _bsa !== 'undefined' && !_bsa.exists(el)) {
if (typeof _bsa !== 'undefined' && !parent.isAd) {
_bsa.init('custom', 'CESDC2QN', 'placement:macosiconscom',
{
target: '#iconbar-js',
Expand All @@ -43,22 +43,30 @@ export default {
`
}
);
parent.isAd == true
}
}
let el = document.getElementById("customAd")
window.BSANativeCallback = (a) => {
const total = a.ads.length;
if (!total) {
getAd(el)
parent.isAd = true
}
}
getAd(el)
if (!parent.isAd) {
console.log(parent.isAd);
setTimeout(() =>{
if (!_bsa.exists(el)) {
getAd(el)
// _bsa.reload("#iconbar-js")
}
}, 800)
}
},
methods:{
Expand Down

1 comment on commit 1e54fdb

@vercel
Copy link

@vercel vercel bot commented on 1e54fdb Apr 2, 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.