From 69a085c116765584498a9fa1bccdf2a5f6530f16 Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 5 Oct 2015 18:06:05 +0300 Subject: [PATCH] Fix occasional Chrome mismatch requestUrl!=sender.tab.url --- background.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/background.js b/background.js index 2f362e5c..9c3c1779 100644 --- a/background.js +++ b/background.js @@ -35,7 +35,9 @@ chrome.extension.onMessage.addListener(function(request, sender, sendResponse) { case "getStyles": var styles = getStyles(request, sendResponse); // check if this is a main content frame style enumeration - if (request.matchUrl && !request.id && sender && sender.tab && sender.frameId == 0) { + if (request.matchUrl && !request.id + && sender && sender.tab && sender.frameId == 0 + && sender.tab.url == request.matchUrl) { updateIcon(sender.tab, styles); } return true;