remove window.parent check from contentscript

The manifest 'all_frames' property defaults to false, so the contentscript should not need to perform the window.parent check.
This commit is contained in:
luke crouch
2016-07-21 11:26:31 -05:00
committed by GitHub
parent ec1830914e
commit 0b34b991bf

View File

@@ -22,15 +22,13 @@ function toggleToolbar(toolbarUI) {
}
}
// Handle messages from the add-on background page (only in top level iframes)
if (window.parent == window) {
chrome.runtime.onMessage.addListener(function(msg) {
if (msg == "toggle-in-page-toolbar") {
if (toolbarUI) {
toggleToolbar(toolbarUI);
} else {
toolbarUI = initToolbar();
}
// Handle messages from the add-on background page
chrome.runtime.onMessage.addListener(function(msg) {
if (msg == "toggle-in-page-toolbar") {
if (toolbarUI) {
toggleToolbar(toolbarUI);
} else {
toolbarUI = initToolbar();
}
});
}
}
});