this may or may not fix or mitigate #996

This commit is contained in:
gorhill 2015-03-14 17:30:44 -04:00
parent 1f9030f6cb
commit aadd95ca77
2 changed files with 16 additions and 0 deletions

View File

@ -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);
};
/******************************************************************************/

View File

@ -37,6 +37,7 @@
<div><span data-i18n="popup3pScriptRulePrompt"></span><span data-src="/" data-des="*" data-type="3p-script"> </span><span data-src="." data-des="*" data-type="3p-script"> </span></div>
<div><span data-i18n="popup3pFrameRulePrompt"></span><span data-src="/" data-des="*" data-type="3p-frame"> </span><span data-src="." data-des="*" data-type="3p-frame"> </span></div>
</div><div id="saveRules" class="fa">&#xf13e;</div>
<div>&nbsp;</div>
</div>
</div>