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); |
+}); |