Index: include.preload.js |
=================================================================== |
--- a/include.preload.js |
+++ b/include.preload.js |
@@ -78,9 +78,12 @@ |
if (!url) |
return; |
- var type = typeMap[tag]; |
- chrome.extension.sendRequest({reqtype: "should-collapse", url: url, documentUrl: document.URL, type: type}, function(response) |
- { |
+ ext.backgroundPage.sendMessage({ |
+ type: "should-collapse", |
+ url: url, |
+ documentUrl: document.URL, |
+ mediatype: typeMap[tag] |
+ }, function(response) { |
if (response && target.parentNode) |
{ |
// <frame> cannot be removed, doing that will mess up the frameset |
@@ -102,8 +105,11 @@ |
document.addEventListener("error", checkCollapse, true); |
document.addEventListener("load", checkCollapse, true); |
- chrome.extension.sendRequest({reqtype: "get-settings", selectors: true, frameUrl: window.location.href}, function(response) |
- { |
+ ext.backgroundPage.sendMessage({ |
+ type: "get-settings", |
+ selectors: true, |
+ frameUrl: window.location.href |
+ }, function(response) { |
setElemhideCSSRules(response.selectors); |
}); |
} |