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

Delta Between Two Patch Sets: lib/api.js

Issue 5797488346791936: Issue 1107 - Support notifications (Closed)
Left Patch Set: move MarkAsShown into Notification class and get rid of locale arg in Notification::GetTexts Created Jan. 22, 2015, 10:02 a.m.
Right Patch Set: fix comment Created Jan. 23, 2015, 3:56 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/Notification.h ('k') | lib/prefs.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
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 getNextNotificationToShow: function(url) 140 getNextNotificationToShow: function(url)
141 { 141 {
142 return Notification.getNextToShow(url); 142 return Notification.getNextToShow(url);
143 }, 143 },
144 144
145 getNotificationTexts: function(notification) 145 getNotificationTexts: function(notification)
146 { 146 {
147 return Notification.getLocalizedTexts(notification); 147 return Notification.getLocalizedTexts(notification);
148 }, 148 },
149 149
150 addNotification: function(notification)
151 {
152 return Notification.addNotification(notification);
153 },
154
155 removeNotification: function(notification)
156 {
157 return Notification.removeNotification(notification);
158 },
159
160 markNotificationAsShown: function(id) 150 markNotificationAsShown: function(id)
161 { 151 {
162 Notification.markAsShown(id); 152 Notification.markAsShown(id);
163 }, 153 },
164 checkFilterMatch: function(url, contentType, documentUrl) 154 checkFilterMatch: function(url, contentType, documentUrl)
165 { 155 {
166 var requestHost = extractHostFromURL(url); 156 var requestHost = extractHostFromURL(url);
167 var documentHost = extractHostFromURL(documentUrl); 157 var documentHost = extractHostFromURL(documentUrl);
168 var thirdParty = isThirdParty(requestHost, documentHost); 158 var thirdParty = isThirdParty(requestHost, documentHost);
169 return defaultMatcher.matchesAny(url, contentType, documentHost, thirdPart y); 159 return defaultMatcher.matchesAny(url, contentType, documentHost, thirdPart y);
(...skipping 23 matching lines...) Expand all
193 { 183 {
194 return extractHostFromURL(url); 184 return extractHostFromURL(url);
195 }, 185 },
196 186
197 compareVersions: function(v1, v2) 187 compareVersions: function(v1, v2)
198 { 188 {
199 return Services.vc.compare(v1, v2); 189 return Services.vc.compare(v1, v2);
200 } 190 }
201 }; 191 };
202 })(); 192 })();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld