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

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

Issue 29325137: Issue 2950 - Don`t rely on Services.mm, it isn`t available before Gecko 39 (Closed)
Patch Set: Created Aug. 27, 2015, 12:12 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 | lib/main.js » ('j') | no next file with comments »
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 Services.mm.broadcastAsyncMessage("ElemHideHelper:Preview", { 496 let messageManager = Cc["@mozilla.org/globalmessagemanager;1"]
497 .getService(Ci.nsIMessageBroadcaster);
498 messageManager.broadcastAsyncMessage("ElemHideHelper:Preview", {
497 nodeID: nodeID, 499 nodeID: nodeID,
498 stylesheetData: preview ? stylesheetData : null, 500 stylesheetData: preview ? stylesheetData : null,
499 forgetNode: !!forgetNode 501 forgetNode: !!forgetNode
500 }); 502 });
501 } 503 }
502 504
503 function changeDomain(node) { 505 function changeDomain(node) {
504 domainData.selected = node.getAttribute("value"); 506 domainData.selected = node.getAttribute("value");
505 updateExpression(); 507 updateExpression();
506 } 508 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 567
566 fillAttributes(item.nodeData); 568 fillAttributes(item.nodeData);
567 } 569 }
568 570
569 function addExpression() 571 function addExpression()
570 { 572 {
571 AdblockPlus.addPatterns([document.getElementById("expression").value]); 573 AdblockPlus.addPatterns([document.getElementById("expression").value]);
572 574
573 togglePreview(false); 575 togglePreview(false);
574 } 576 }
OLDNEW
« no previous file with comments | « no previous file | lib/main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld