Skip to content

Commit

Permalink
fix(ima-ads): Set skip button as optional, it is no long required
Browse files Browse the repository at this point in the history
Set skip button as optional, it is no long required
  • Loading branch information
Elecash committed May 12, 2017
1 parent c86bece commit e6072d3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/ima-ads/vg-ima-ads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@ export class VgImaAds implements OnInit, OnDestroy {
initializations() {
this.ima = new Ima(this.elem);

this.skipButton = document.querySelector(this.vgSkipButton) as HTMLElement;
this.skipButton.style.display = 'none';
this.skipButton.addEventListener('click', this.onClickSkip.bind(this));
this.elem.insertBefore(this.skipButton, this.elem.firstChild);
if (this.vgSkipButton) {
this.skipButton = document.querySelector(this.vgSkipButton) as HTMLElement;
this.skipButton.style.display = 'none';
this.skipButton.addEventListener('click', this.onClickSkip.bind(this));
this.elem.insertBefore(this.skipButton, this.elem.firstChild);
}

window.addEventListener('resize', () => {
const w = this.API.videogularElement.offsetWidth;
Expand Down

0 comments on commit e6072d3

Please sign in to comment.