| Index: include.preload.js |
| diff --git a/include.preload.js b/include.preload.js |
| index 949d039663f9130843b4d8d0a3ddfcb434522066..ba13743032bb25de59b5a31fc12d4cc28f4d80ed 100644 |
| --- a/include.preload.js |
| +++ b/include.preload.js |
| @@ -126,7 +126,7 @@ function getURLsFromElement(element) |
| return urls; |
| } |
| -function checkCollapse(element) |
| +function checkCollapse(element, contentDocument) |
| { |
| window.collapsing = true; |
| @@ -138,14 +138,17 @@ function checkCollapse(element) |
| if (urls.length == 0) |
| return; |
| - ext.backgroundPage.sendMessage( |
| - { |
| - type: "filters.collapse", |
| - urls: urls, |
| - mediatype: mediatype, |
| - baseURL: document.location.href |
| - }, |
| + var message = { |
| + type: "filters.collapse", |
| + urls: urls, |
| + mediatype: mediatype, |
| + baseURL: document.location.href |
| + }; |
| + |
| + if (contentDocument) |
| + message.dynamicFrameURL = contentDocument.location.href; |
| + ext.backgroundPage.sendMessage(message, |
| function(collapse) |
| { |
| function collapseElement() |
| @@ -556,7 +559,10 @@ function init(document) |
| if (!contentWindow.collapsing) |
|
Sebastian Noack
2016/08/10 12:38:52
I'd rather remove this workaround than adding yet
|
| Array.prototype.forEach.call( |
| contentDocument.querySelectorAll(Object.keys(typeMap).join(",")), |
| - checkCollapse |
| + function(element) |
| + { |
| + checkCollapse(element, contentDocument); |
| + } |
| ); |
| } |
| } |