Styles and fixes switching between pages, Ref: #361

This commit is contained in:
ziajka 2019-04-04 09:13:06 +02:00
parent e2afeffe2f
commit 7b1371dff9
3 changed files with 19 additions and 4 deletions

View File

@ -1,4 +1,5 @@
<table style="width: 600px; border: 0px solid #C0C0C0; background-color: #263238" cellSpacing=0 cellPadding=3>
<table class="butler" style="width: 600px; border: 0px solid #C0C0C0; background-color: #263238" cellSpacing=0 cellPadding=3>
<tr><td height=80 style="background-color: #263238" #code>
<div id="{{ this.divId }}"></div>

View File

@ -0,0 +1,7 @@
.butler a {
color: #0097a7;
}
.butler {
font-size: 14px;
}

View File

@ -1,11 +1,12 @@
import { Component, OnInit, ElementRef, ViewChild, AfterViewInit } from '@angular/core';
import { Component, OnInit, ElementRef, ViewChild, AfterViewInit, ViewEncapsulation, OnDestroy } from '@angular/core';
@Component({
selector: 'app-adbutler',
templateUrl: './adbutler.component.html',
styleUrls: ['./adbutler.component.scss']
styleUrls: ['./adbutler.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class AdbutlerComponent implements OnInit, AfterViewInit {
export class AdbutlerComponent implements OnInit, AfterViewInit, OnDestroy {
id: number;
setId: number;
rnd: number;
@ -58,4 +59,10 @@ export class AdbutlerComponent implements OnInit, AfterViewInit {
this.code.nativeElement.appendChild(scriptElement);
}
ngOnDestroy() {
// start from 0 when switching pages
(window as any).sparkCounter355353 = 0;
delete (window as any).loadedTextAds355353[this.sparkCounter];
}
}