Changes between Version 3 and Version 6 of Ticket #5835


Ignore:
Timestamp:
10/06/2017 03:59:36 PM (3 years ago)
Author:
kzar
Comment:

Cool idea, I've updated the description again.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5835 – Description

    v3 v6  
    55Add a `"notifications.get"` message handler to adblockplusui/messageResponders.js. 
    66 
    7 It should return an Array of active notifications, or an empty Array if there aren't any. The notifications can be fetched using `getActiveNotifications()` in adblockpluschrome/lib/notificationHelper.js. For each notification in the Array the `texts` property should be populated with the result of `getLocalizedTexts()` from adblockpluscore/lib/notifications.js. The `displayMethods` property should also be populated with the result of `getDisplayMethods` from adblockpluschrome/lib/notificationHelper.js. 
     7It should return an Array of active notifications, or an empty Array if there aren't any. The notifications can be fetched using `getActiveNotifications()` in adblockpluschrome/lib/notificationHelper.js. For each notification in the Array the `texts` property should be populated with the result of `getLocalizedTexts()` from adblockpluscore/lib/notifications.js. 
    88 
    9 === Integration notes === 
    10 The `getDisplayMethods` function will need to be added to, and exported from, adblockpluschrome/lib/notificationHelper.js. It should return `displayMethods[notificationType] || defaultDisplayMethods`. 
     9The message handler should optionally take a `displayMethod` field, for which if specified restricts the returned notifications to the given display method e.g. "popup". The handler can make use of shouldDisplay() in adblockpluschrome/lib/notificationHelper.js to filter the notifications by the given display method.