OLD | NEW |
1 /* | 1 /* |
2 * This Source Code is subject to the terms of the Mozilla Public License | 2 * This Source Code is subject to the terms of the Mozilla Public License |
3 * version 2.0 (the "License"). You can obtain a copy of the License at | 3 * version 2.0 (the "License"). You can obtain a copy of the License at |
4 * http://mozilla.org/MPL/2.0/. | 4 * http://mozilla.org/MPL/2.0/. |
5 */ | 5 */ |
6 | 6 |
7 let {Prefs} = require("prefs"); | 7 let {Prefs} = require("prefs"); |
8 | 8 |
9 let domainData; | 9 let domainData; |
10 let nodeData; | 10 let nodeData; |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 if (advancedMode) | 486 if (advancedMode) |
487 { | 487 { |
488 // Add custom CSS entry | 488 // Add custom CSS entry |
489 node = createAttribute("advanced", nodeData.customCSS, list.getAttribute("_l
abelcustom"), nodeData.customCSS.selected); | 489 node = createAttribute("advanced", nodeData.customCSS, list.getAttribute("_l
abelcustom"), nodeData.customCSS.selected); |
490 list.appendChild(node); | 490 list.appendChild(node); |
491 } | 491 } |
492 } | 492 } |
493 | 493 |
494 function togglePreview(preview, forgetNode) | 494 function togglePreview(preview, forgetNode) |
495 { | 495 { |
496 let messageManager = Cc["@mozilla.org/globalmessagemanager;1"] | 496 let messageManager = Cc["@mozilla.org/parentprocessmessagemanager;1"] |
497 .getService(Ci.nsIMessageBroadcaster); | 497 .getService(Ci.nsIMessageBroadcaster); |
498 messageManager.broadcastAsyncMessage("ElemHideHelper:Preview", { | 498 messageManager.broadcastAsyncMessage("ElemHideHelper:Preview", { |
499 nodeID: nodeID, | 499 nodeID: nodeID, |
500 stylesheetData: preview ? stylesheetData : null, | 500 stylesheetData: preview ? stylesheetData : null, |
501 forgetNode: !!forgetNode | 501 forgetNode: !!forgetNode |
502 }); | 502 }); |
503 } | 503 } |
504 | 504 |
505 function changeDomain(node) { | 505 function changeDomain(node) { |
506 domainData.selected = node.getAttribute("value"); | 506 domainData.selected = node.getAttribute("value"); |
507 updateExpression(); | 507 updateExpression(); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 | 567 |
568 fillAttributes(item.nodeData); | 568 fillAttributes(item.nodeData); |
569 } | 569 } |
570 | 570 |
571 function addExpression() | 571 function addExpression() |
572 { | 572 { |
573 AdblockPlus.addPatterns([document.getElementById("expression").value]); | 573 AdblockPlus.addPatterns([document.getElementById("expression").value]); |
574 | 574 |
575 togglePreview(false); | 575 togglePreview(false); |
576 } | 576 } |
OLD | NEW |