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

Side by Side Diff: lib/api.js

Issue 29317074: Issue 2693 - Update adblockplus dependency (Closed)
Patch Set: Created June 18, 2015, 3:31 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 | « include/AdblockPlus/FilterEngine.h ('k') | lib/prefs.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 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
(...skipping 10 matching lines...) Expand all
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 30
31 Notification.addShowListener(function (notification)
32 {
33 _triggerEvent("notificationAvailable", notification);
34 });
35
31 return { 36 return {
32 getFilterFromText: function(text) 37 getFilterFromText: function(text)
33 { 38 {
34 text = Filter.normalize(text); 39 text = Filter.normalize(text);
35 if (!text) 40 if (!text)
36 throw "Attempted to create a filter from empty text"; 41 throw "Attempted to create a filter from empty text";
37 return Filter.fromText(text); 42 return Filter.fromText(text);
38 }, 43 },
39 44
40 isListedFilter: function(filter) 45 isListedFilter: function(filter)
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 135
131 // These aren't normally properties of a Subscription object 136 // These aren't normally properties of a Subscription object
132 subscription.author = subscriptions[i].author; 137 subscription.author = subscriptions[i].author;
133 subscription.prefixes = subscriptions[i].prefixes; 138 subscription.prefixes = subscriptions[i].prefixes;
134 subscription.specialization = subscriptions[i].specialization; 139 subscription.specialization = subscriptions[i].specialization;
135 result.push(subscription); 140 result.push(subscription);
136 } 141 }
137 return result; 142 return result;
138 }, 143 },
139 144
140 getNextNotificationToShow: function(url) 145 showNextNotification: function(url)
141 { 146 {
142 return Notification.getNextToShow(url); 147 Notification.showNext(url);
143 }, 148 },
144 149
145 getNotificationTexts: function(notification) 150 getNotificationTexts: function(notification)
146 { 151 {
147 return Notification.getLocalizedTexts(notification); 152 return Notification.getLocalizedTexts(notification);
148 }, 153 },
149 154
150 markNotificationAsShown: function(id) 155 markNotificationAsShown: function(id)
151 { 156 {
152 Notification.markAsShown(id); 157 Notification.markAsShown(id);
(...skipping 30 matching lines...) Expand all
183 { 188 {
184 return extractHostFromURL(url); 189 return extractHostFromURL(url);
185 }, 190 },
186 191
187 compareVersions: function(v1, v2) 192 compareVersions: function(v1, v2)
188 { 193 {
189 return Services.vc.compare(v1, v2); 194 return Services.vc.compare(v1, v2);
190 } 195 }
191 }; 196 };
192 })(); 197 })();
OLDNEW
« no previous file with comments | « include/AdblockPlus/FilterEngine.h ('k') | lib/prefs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld