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

Side by Side Diff: lib/ui.js

Issue 8559070: Integrated URL Fixer into Adblock Plus (Closed)
Patch Set: Changes to opt-in notification text Created Oct. 19, 2012, 3:14 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
« lib/typoRules.js ('K') | « lib/typoSurvey.js ('k') | no next file » | 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 Cu.import("resource://gre/modules/XPCOMUtils.jsm"); 7 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
8 Cu.import("resource://gre/modules/Services.jsm"); 8 Cu.import("resource://gre/modules/Services.jsm");
9 9
10 let {Utils} = require("utils"); 10 let {Utils} = require("utils");
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 { 117 {
118 this.value = UI.toggleAcceptableAds(); 118 this.value = UI.toggleAcceptableAds();
119 }); 119 });
120 120
121 setChecked("adblockplus-sync", syncEngine && syncEngine.enabled); 121 setChecked("adblockplus-sync", syncEngine && syncEngine.enabled);
122 addCommandHandler("adblockplus-sync", function() 122 addCommandHandler("adblockplus-sync", function()
123 { 123 {
124 this.value = UI.toggleSync(); 124 this.value = UI.toggleSync();
125 }); 125 });
126 126
127 setChecked("adblockplus-typoCorrection", Prefs.correctTypos);
128 addCommandHandler("adblockplus-typoCorrection", function()
129 {
130 Prefs.correctTypos = !Prefs.correctTypos;
131 this.value = Prefs.correctTypos;
132 });
133
127 let window = null; 134 let window = null;
128 for (window in UI.applicationWindows) 135 for (window in UI.applicationWindows)
129 break; 136 break;
130 137
131 if (window) 138 if (window)
132 { 139 {
133 setChecked("adblockplus-showinaddonbar", UI.isToolbarIconVisible(window) ); 140 setChecked("adblockplus-showinaddonbar", UI.isToolbarIconVisible(window) );
134 setChecked("adblockplus-showintoolbar", UI.isToolbarIconVisible(window)) ; 141 setChecked("adblockplus-showintoolbar", UI.isToolbarIconVisible(window)) ;
135 142
136 let handler = function() 143 let handler = function()
(...skipping 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after
1911 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], 1918 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)],
1912 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] 1919 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)]
1913 ]; 1920 ];
1914 1921
1915 onShutdown.add(function() 1922 onShutdown.add(function()
1916 { 1923 {
1917 for (let window in UI.applicationWindows) 1924 for (let window in UI.applicationWindows)
1918 if (UI.isBottombarOpen(window)) 1925 if (UI.isBottombarOpen(window))
1919 UI.toggleBottombar(window); 1926 UI.toggleBottombar(window);
1920 }); 1927 });
OLDNEW
« lib/typoRules.js ('K') | « lib/typoSurvey.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld