Fix error handling on style injection
This commit is contained in:
parent
e173a71ba6
commit
ae4ee9ddee
@ -219,13 +219,22 @@ class Popup {
|
|||||||
});
|
});
|
||||||
this._observeFullscreen(true);
|
this._observeFullscreen(true);
|
||||||
this._onFullscreenChanged();
|
this._onFullscreenChanged();
|
||||||
|
this._injectStyles();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async _injectStyles() {
|
||||||
try {
|
try {
|
||||||
Popup._injectStylesheet('yomichan-popup-outer-stylesheet', 'file', '/fg/css/client.css', true);
|
await Popup._injectStylesheet('yomichan-popup-outer-stylesheet', 'file', '/fg/css/client.css', true);
|
||||||
this.setCustomOuterCss(this._options.general.customPopupOuterCss, true);
|
} catch (e) {
|
||||||
|
// NOP
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
await this.setCustomOuterCss(this._options.general.customPopupOuterCss, true);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// NOP
|
// NOP
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_observeFullscreen(observe) {
|
_observeFullscreen(observe) {
|
||||||
|
Loading…
Reference in New Issue
Block a user