| 17 | protected logger; |
| 18 | |
| 19 | constructor(public url: string) { |
| 20 | this.logger = con.m('SimklClass', '#9b7400'); |
| 21 | |
| 22 | utils.urlChangeDetect(() => { |
| 23 | clearInterval(this.interval); |
| 24 | this.interval = utils.waitUntilTrue( |
| 25 | function () { |
| 26 | return ( |
| 27 | (!$('#global_div').length || parseInt($('#global_div').css('opacity')) === 1) && |
| 28 | (!$('#tvMainTable').length || parseInt($('#tvMainTable').css('opacity')) === 1) |
| 29 | ); |
| 30 | }, |
| 31 | () => { |
| 32 | this.url = window.location.href; |
| 33 | this.init(); |
| 34 | }, |
| 35 | 1000, |
| 36 | ); |
| 37 | }); |
| 38 | |
| 39 | api.storage.addStyle( |
| 40 | require('!to-string-loader!css-loader!less-loader!./style.less').toString(), |
| 41 | ); |
| 42 | $(document).ready(() => { |
| 43 | this.init(); |
| 44 | }); |
| 45 | } |
| 46 | |
| 47 | async init() { |
| 48 | await waitForPageToBeVisible(); |