Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/content/composer.js

Issue 29357572: Issue 4536 - Make sure the elements stay hidden after adding the filter (Closed) Base URL: https://hg.adblockplus.org/elemhidehelper
Patch Set: Created Oct. 17, 2016, 9:58 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/content/composer.xul » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/composer.js
===================================================================
--- a/chrome/content/composer.js
+++ b/chrome/content/composer.js
@@ -7,18 +7,18 @@
let {Prefs} = require("prefs");
let domainData;
let nodeData;
let nodeID;
let selectedNode = null;
var advancedMode = false;
let treeView = null;
+let ruleAdded = false;
let stylesheetData;
-let previewStyle = null;
saroyanm 2016/10/17 14:41:44 I assume it's irrelevant to the review, but redund
Wladimir Palant 2016/10/17 14:51:29 Yes, became redundant due to E10S adjustments and
let abpURL = Cc["@adblockplus.org/abp/public;1"].getService(Ci.nsIURI);
Cu.import(abpURL.spec);
/*******************
* TreeView object *
*******************/
@@ -566,11 +566,15 @@ function updateNodeSelection() {
return;
fillAttributes(item.nodeData);
}
function addExpression()
{
AdblockPlus.addPatterns([document.getElementById("expression").value]);
+ ruleAdded = true;
+}
- togglePreview(false);
-}
+window.addEventListener("unload", () =>
+{
+ togglePreview(ruleAdded, true);
+});
« no previous file with comments | « no previous file | chrome/content/composer.xul » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld