| 45 | public strongVolumes = false; |
| 46 | |
| 47 | constructor( |
| 48 | public url, |
| 49 | public pages, |
| 50 | protected floatClick: any = () => { |
| 51 | throw 'No click handling found'; |
| 52 | }, |
| 53 | ) { |
| 54 | this.page = this.getPage(url); |
| 55 | if (this.page === null) { |
| 56 | throw new Error('Page could not be recognized'); |
| 57 | } |
| 58 | this.domainSet(); |
| 59 | logger.log('Page', this.page.name); |
| 60 | if ( |
| 61 | !( |
| 62 | typeof api.settings.get('enablePages')[this.page.name] === 'undefined' || |
| 63 | api.settings.get('enablePages')[this.page.name] |
| 64 | ) |
| 65 | ) { |
| 66 | logger.info('Sync is disabled for this page', this.page.name); |
| 67 | throw 'Stop Script'; |
| 68 | } |
| 69 | |
| 70 | emitter.on('syncPage_fillUi', () => this.fillUI()); |
| 71 | } |
| 72 | |
| 73 | init() { |
| 74 | const This = this; |