From aadd95ca7778ba0e2cf17387c9715aaec94876cc Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 14 Mar 2015 17:30:44 -0400 Subject: [PATCH] this may or may not fix or mitigate #996 --- src/js/popup.js | 15 +++++++++++++++ src/popup.html | 1 + 2 files changed, 16 insertions(+) diff --git a/src/js/popup.js b/src/js/popup.js index 891f8ce58..ad8668bf7 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -29,6 +29,16 @@ /******************************************************************************/ +// https://github.com/gorhill/uBlock/issues/996 +// Experimental: mitigate glitchy popup UI: immediately set the firewall pane +// visibility to its last known state. By default the pane is hidden. +// Will remove if it makes no difference. +if ( vAPI.localStorage.getItem('popupFirewallPane') === 'true' ) { + uDom('#panes').addClass('dfEnabled'); +} + +/******************************************************************************/ + var popupData; var dfPaneBuilt = false; var popupHeight; @@ -493,6 +503,11 @@ var toggleFirewallPane = function() { if ( popupData.dfEnabled && dfPaneBuilt === false ) { buildAllFirewallRows(); } + + // https://github.com/gorhill/uBlock/issues/996 + // Experimental: Remember the last state of the firewall pane. + // Will remove if it makes no difference. + vAPI.localStorage.setItem('popupFirewallPane', popupData.dfEnabled); }; /******************************************************************************/ diff --git a/src/popup.html b/src/popup.html index b3bf5af13..fe27b630f 100644 --- a/src/popup.html +++ b/src/popup.html @@ -37,6 +37,7 @@
+