From d102a8cd7dbea51ee085fad9011fb41c4e34e088 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Mon, 5 Jul 2021 01:17:10 +0200 Subject: [PATCH] fix popup --- src/popup/panels/SiteDetailsPanel.vue | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/popup/panels/SiteDetailsPanel.vue b/src/popup/panels/SiteDetailsPanel.vue index 1f22ecb..c19c421 100644 --- a/src/popup/panels/SiteDetailsPanel.vue +++ b/src/popup/panels/SiteDetailsPanel.vue @@ -30,8 +30,6 @@ - - -->
@@ -51,11 +49,11 @@ (show advanced options) + >(use advanced options) (hide advanced options) + >(use basic options)
@@ -256,19 +254,19 @@ export default { }, created() { try { - this.videoManualQs = this.settings.active.sites[this.site].DOM.video.manual || this.videoManualQs; - this.videoQs = this.settings.active.sites[this.site].DOM.video.querySelectors; - this.videoCss = this.settings.active.sites[this.site].DOM.video.additionalCss; + this.videoManualQs = this.settings.active.sites[this.site]?.DOM?.video?.manual ?? this.videoManualQs; + this.videoQs = this.settings.active.sites[this.site]?.DOM?.video?.querySelectors; + this.videoCss = this.settings.active.sites[this.site]?.DOM?.video?.additionalCss; } catch (e) { // that's here just in case relevant settings for this site don't exist yet } try { - this.playerManualQs = this.settings.active.sites[this.site].DOM.player.manual || this.playerManualQs; - this.playerQs = this.settings.active.sites[this.site].DOM.player.querySelectors; - this.playerByNodeIndex = this.settings.active.sites[this.site].DOM.player.useRelativeAncestor || this.playerByNodeIndex; - this.playerParentNodeIndex = this.settings.active.sites[this.site].DOM.player.videoAncestor; - this.usePlayerAr = this.settings.active.sites[this.site].usePlayerArInFullscreen; + this.playerManualQs = this.settings.active.sites[this.site]?.DOM?.player?.manual ?? this.playerManualQs; + this.playerQs = this.settings.active.sites[this.site]?.DOM?.player?.querySelectors; + this.playerByNodeIndex = this.settings.active.sites[this.site]?.DOM?.player?.useRelativeAncestor ?? this.playerByNodeIndex; + this.playerParentNodeIndex = this.settings.active.sites[this.site]?.DOM?.player?.videoAncestor; + this.usePlayerAr = this.settings.active.sites[this.site]?.usePlayerArInFullscreen; } catch (e) { // that's here just in case relevant settings for this site don't exist yet }