|
|
@@ -35,7 +35,7 @@ this.singlefile.lib.processors.lazy.content.loader = this.singlefile.lib.process
|
|
|
const removeEventListener = (type, listener, options) => window.removeEventListener(type, listener, options);
|
|
|
const timeouts = new Map();
|
|
|
|
|
|
- if (browser && browser.runtime) {
|
|
|
+ if (browser && browser.runtime && browser.runtime.onMessage && browser.runtime.onMessage.addListener) {
|
|
|
browser.runtime.onMessage.addListener(message => {
|
|
|
if (message.method == "singlefile.lazyTimeout.onTimeout") {
|
|
|
const timeoutData = timeouts.get(message.type);
|