Skip to content

Commit

Permalink
fix - collapse ads on empty ads
Browse files Browse the repository at this point in the history
  • Loading branch information
nechehin committed Oct 24, 2017
1 parent 30141fe commit 5411ffb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion vast-contentroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))};d.p
/*!
* VAST content-roll
*
* @version 0.0.8
* @version 0.0.9
* @link https://github.com/nechehin/vast-contentroll
*/
(function(){
Expand Down Expand Up @@ -255,6 +255,7 @@ this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))};d.p
*/
function onAdsEmpty(roll) {
intersectionObserver.unobserve(roll);
roll.style.height = '0';

var onEmptyCallback = data(roll, 'on-empty');
if (typeof window[onEmptyCallback] === 'function') {
Expand Down
16 changes: 8 additions & 8 deletions vast-contentroll.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5411ffb

Please sign in to comment.