From a3d01f7fb41b7637a5becd2c1172552d7f8651f5 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Sun, 7 Jul 2019 21:13:28 +0200 Subject: [PATCH] Fixed issue where user-defined css wasn't loading. --- src/ext/lib/video-data/PageInfo.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/ext/lib/video-data/PageInfo.js b/src/ext/lib/video-data/PageInfo.js index dbc76f2..5aeac23 100644 --- a/src/ext/lib/video-data/PageInfo.js +++ b/src/ext/lib/video-data/PageInfo.js @@ -24,6 +24,17 @@ class PageInfo { this.comms = comms; } + // request inject css immediately + try { + const playerStyleString = this.settings.active.sites[window.location.host].css.replace('\\n', ''); + this.comms.sendMessage({ + cmd: 'inject-css', + cssString: playerStyleString + }); + } catch (e) { + // do nothing. It's ok if there's no special settings for the player element + } + this.rescan(RescanReason.PERIODIC); this.scheduleUrlCheck();