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

Side by Side Diff: chrome/content/composer.js

Issue 29332902: Issue 3443 - Use process script instead of a frame script in Element Hiding Helper (Closed)
Patch Set: Created Dec. 21, 2015, 12:45 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/content/frameScript.js » ('j') | chrome/content/processScript.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/content/frameScript.js » ('j') | chrome/content/processScript.js » ('J')

Powered by Google App Engine
This is Rietveld