From bb3349eff924dc2c758c5773552a13d1f85b7139 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Thu, 27 Sep 2018 00:17:49 +0200 Subject: [PATCH] Edge stuff --- js/lib/Comms.js | 8 ++++++-- js/modules/PageInfo.js | 2 -- res/css/common.css | 16 ++++++++++++++++ 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/js/lib/Comms.js b/js/lib/Comms.js index d82e38b..f7ab7c9 100644 --- a/js/lib/Comms.js +++ b/js/lib/Comms.js @@ -24,7 +24,9 @@ class CommsClient { destroy() { this.pageInfo = null; this.settings = null; - this.port.onMessage.removeListener(this._listener); + if (!BrowserDetect.edge) { // edge is a very special browser made by outright morons. + this.port.onMessage.removeListener(this._listener); + } } setPageInfo(pageInfo){ @@ -37,7 +39,9 @@ class CommsClient { var ths = this; this._listener = m => ths.processReceivedMessage(m); - this.port.onMessage.removeListener(this._listener); + if (!BrowserDetect.edge) { + this.port.onMessage.removeListener(this._listener); + } this.port.onMessage.addListener(this._listener); } diff --git a/js/modules/PageInfo.js b/js/modules/PageInfo.js index d437a91..2eb84a2 100644 --- a/js/modules/PageInfo.js +++ b/js/modules/PageInfo.js @@ -106,8 +106,6 @@ class PageInfo { } this.removeDestroyed(); - - // console.log("Rescan complete. Total videos?", this.videos.length) }catch(e){ console.log("rescan error:",e) } diff --git a/res/css/common.css b/res/css/common.css index e6f6e14..ad12dfc 100644 --- a/res/css/common.css +++ b/res/css/common.css @@ -146,6 +146,22 @@ strike { background-color: #222 !important; } +/* BROWSER-SPECIFIC DISABLE */ +.disabled-edge { + pointer-events: none !important; + filter: contrast(50%) brightness(40%) grayscale(100%) !important; + content: "NOT SUPPORTED IN THIS BROWSER"; +} +.disabled-edge::after { + background-color: #333272; + color: #d8d9e6; + display: inline-block; + font-size: .75em; + font-variant: small-caps; + padding-left: 5px; + padding-right: 5px; + margin-left: 10px; +} /* BUTTONS AND INPUTS */