Fix occasional Chrome mismatch requestUrl!=sender.tab.url
This commit is contained in:
parent
274584510f
commit
69a085c116
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user