()
| 71 | } |
| 72 | |
| 73 | init() { |
| 74 | const This = this; |
| 75 | j.$(document).ready(function () { |
| 76 | initFloatButton(This, This.floatClick); |
| 77 | }); |
| 78 | |
| 79 | if (this.testForCloudflare()) { |
| 80 | logger.log('loading'); |
| 81 | this.cdn(); |
| 82 | return; |
| 83 | } |
| 84 | |
| 85 | this.page.init(this); |
| 86 | |
| 87 | if (api.type === 'webextension') { |
| 88 | // Discord Presence |
| 89 | try { |
| 90 | chrome.runtime.onMessage.addListener((info, sender, sendResponse) => { |
| 91 | this.presence(info, sender, sendResponse); |
| 92 | }); |
| 93 | } catch (e) { |
| 94 | logger.error(e); |
| 95 | } |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | private getPage(url) { |
| 100 | if (this.pages.type) return this.pages; |
no test coverage detected