| Index: safari/ext/popup.js |
| =================================================================== |
| --- a/safari/ext/popup.js |
| +++ b/safari/ext/popup.js |
| @@ -21,3 +21,12 @@ |
| { |
| safari.self.hide(); |
| }, true); |
| + |
| +// Safari doesn't adjust the size of the popover automatically to the size of |
| +// its content, like when the ad counter is expanded/collapsed. So we add an |
| +// event listener to do so. |
| +document.addEventListener("DOMSubtreeModified", function() |
| +{ |
| + safari.self.width = document.body.offsetWidth; |
| + safari.self.height = document.body.offsetHeight; |
|
Wladimir Palant
2014/01/15 15:47:13
What about document.documentElement.offsetWidth/He
Sebastian Noack
2014/01/15 17:21:52
No, it doesn't has the right value (sometimes?). D
|
| +}); |