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

Delta Between Two Patch Sets: lib/api.js

Issue 29317074: Issue 2693 - Update adblockplus dependency (Closed)
Left Patch Set: Created June 18, 2015, 3:31 p.m.
Right Patch Set: rebase Created July 2, 2015, 1:37 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « include/AdblockPlus/FilterEngine.h ('k') | lib/notificationShowRegistration.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 var API = (function() 18 var API = (function()
19 { 19 {
20 var Filter = require("filterClasses").Filter; 20 var Filter = require("filterClasses").Filter;
21 var Subscription = require("subscriptionClasses").Subscription; 21 var Subscription = require("subscriptionClasses").Subscription;
22 var SpecialSubscription = require("subscriptionClasses").SpecialSubscription; 22 var SpecialSubscription = require("subscriptionClasses").SpecialSubscription;
23 var FilterStorage = require("filterStorage").FilterStorage; 23 var FilterStorage = require("filterStorage").FilterStorage;
24 var defaultMatcher = require("matcher").defaultMatcher; 24 var defaultMatcher = require("matcher").defaultMatcher;
25 var ElemHide = require("elemHide").ElemHide; 25 var ElemHide = require("elemHide").ElemHide;
26 var Synchronizer = require("synchronizer").Synchronizer; 26 var Synchronizer = require("synchronizer").Synchronizer;
27 var Prefs = require("prefs").Prefs; 27 var Prefs = require("prefs").Prefs;
28 var checkForUpdates = require("updater").checkForUpdates; 28 var checkForUpdates = require("updater").checkForUpdates;
29 var Notification = require("notification").Notification; 29 var Notification = require("notification").Notification;
30
31 Notification.addShowListener(function (notification)
32 {
33 _triggerEvent("notificationAvailable", notification);
34 });
35 30
36 return { 31 return {
37 getFilterFromText: function(text) 32 getFilterFromText: function(text)
38 { 33 {
39 text = Filter.normalize(text); 34 text = Filter.normalize(text);
40 if (!text) 35 if (!text)
41 throw "Attempted to create a filter from empty text"; 36 throw "Attempted to create a filter from empty text";
42 return Filter.fromText(text); 37 return Filter.fromText(text);
43 }, 38 },
44 39
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 { 183 {
189 return extractHostFromURL(url); 184 return extractHostFromURL(url);
190 }, 185 },
191 186
192 compareVersions: function(v1, v2) 187 compareVersions: function(v1, v2)
193 { 188 {
194 return Services.vc.compare(v1, v2); 189 return Services.vc.compare(v1, v2);
195 } 190 }
196 }; 191 };
197 })(); 192 })();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld