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

Unified Diff: lib/requestNotifier.js

Issue 29329779: Issue 3258 - Blockable items: restore item flashing functionality (Closed)
Patch Set: Created Nov. 5, 2015, 8:52 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/child/requestNotifier.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/requestNotifier.js
===================================================================
--- a/lib/requestNotifier.js
+++ b/lib/requestNotifier.js
@@ -117,16 +117,34 @@ RequestNotifier.prototype =
{
this.listener.call(this.listenerObj, entry, this.scanComplete);
},
onComplete: function()
{
this.scanComplete = true;
this.notifyListener(null);
+ },
+
+ /**
+ * Makes the nodes associated with the given requests blink.
+ * @param {number[]} requests list of request IDs that were previously
+ * reported by this notifier.
+ * @param {Boolean} scrollToItem if true, scroll to first node
+ */
+ flashNodes: function(requests, scrollToItem)
+ {
+ if (!requests)
+ requests = [];
+
+ messageManager.broadcastAsyncMessage("AdblockPlus:FlashNodes", {
+ notifierID: this.id,
+ requests,
+ scrollToItem
+ });
}
};
RequestNotifier.storeSelection = function(/**Window*/ wnd, /**String*/ selection)
{
windowSelection.set(wnd.document, selection);
};
RequestNotifier.getSelection = function(/**Window*/ wnd) /**String*/
« no previous file with comments | « lib/child/requestNotifier.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld