| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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) | |
|
Felix Dahlke
2015/06/25 18:35:48
How about moving this, in the spirit of filterUpda
sergei
2015/06/26 14:21:17
Done.
| |
| 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 Loading... | |
| 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 Loading... | |
| 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 })(); |
| OLD | NEW |