| Index: lib/cssInjection.js |
| =================================================================== |
| --- a/lib/cssInjection.js |
| +++ b/lib/cssInjection.js |
| @@ -38,31 +38,31 @@ |
| frameId, |
| matchAboutBlank: true, |
| runAt: "document_start" |
| }); |
| } |
| function removeStyleSheet(tabId, frameId, styleSheet) |
| { |
| - chrome.tabs.removeCSS(tabId, { |
| + browser.tabs.removeCSS(tabId, { |
| code: styleSheet, |
| cssOrigin: "user", |
| frameId, |
| matchAboutBlank: true |
| }); |
| } |
| -function updateFrameStyles(pageId, frameId, selectors, groupName) |
| +function updateFrameStyles(tabId, frameId, selectors, groupName) |
| { |
| let styleSheet = null; |
| if (selectors.length > 0) |
| styleSheet = selectors.join(", ") + "{display: none !important;}"; |
| - let frame = ext.getFrame(pageId, frameId); |
| + let frame = ext.getFrame(tabId, frameId); |
| if (!frame.injectedStyleSheets) |
| frame.injectedStyleSheets = new Map(); |
| let oldStyleSheet = frame.injectedStyleSheets.get(groupName); |
| // Ideally we would compare the old and new style sheets and skip this code |
| // if they're the same, but the old style sheet can be a leftover from a |
| // previous instance of the frame. We must add the new style sheet |