Skip to content

Commit

Permalink
✨Lentainform uniq ad (#25836)
Browse files Browse the repository at this point in the history
* Support for MGID | Idealmedia | Lentainform ads network

* update

* test trigger

* Support for MGID | Idealmedia | Lentainform ads network

* test trigger

* Lentainform new improvements

* Idealmedia fix

* Revert "Idealmedia fix"

This reverts commit cbe9046.

* idealmedia fix

* Revert "idealmedia fix"

This reverts commit 7ea09a7.

* Idealmedia fix

* alentainform. adding uniques widget id

* lentainform. adding uniques widget id

* lentainform. adding uniques widget id

* lentainform. adding uniques widget id
  • Loading branch information
Denys authored Feb 18, 2020
1 parent a79838f commit e5c32f9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ads/lentainform.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,16 @@ export function lentainform(global, data) {
`${encodeURIComponent(data.widget)}.js?t=` +
Math.floor(Date.now() / 36e5);

global.uniqId = (
'00000' + Math.round(Math.random() * 100000).toString(16)
).slice(-5);

global.context.observeIntersection(function(changes) {
changes.forEach(function(c) {
window['intersectionRect' + data.widget] = c.intersectionRect;
window['boundingClientRect' + data.widget] = c.boundingClientRect;
window['intersectionRect' + data.widget + '_' + global.uniqId] =
c.intersectionRect;
window['boundingClientRect' + data.widget + '_' + global.uniqId] =
c.boundingClientRect;
});
});

Expand Down

0 comments on commit e5c32f9

Please sign in to comment.