| Index: background.js |
| =================================================================== |
| --- a/background.js |
| +++ b/background.js |
| @@ -46,17 +46,18 @@ function setDefaultOptions() |
| delete localStorage.experimental; |
| } |
| // Upgrade options before we do anything else. |
| setDefaultOptions(); |
| /** |
| * Checks whether a page is whitelisted. |
| - * @param url {String} |
| + * @param {String} url |
| + * @param {String} [type] content type to be checked, default is "DOCUMENT" |
| * @return {Filter} filter that matched the URL or null if not whitelisted |
| */ |
| function isWhitelisted(url, type) |
| { |
| // Ignore fragment identifier |
| var index = url.indexOf("#"); |
| if (index >= 0) |
| url = url.substring(0, index); |
| @@ -358,17 +359,17 @@ chrome.extension.onRequest.addListener(f |
| var selectors = null; |
| // HACK: We don't know which frame sent us the message, try to find it |
| // in webRequest's frame data. |
| var tabId = -1; |
| var frameId = -1; |
| if (sender.tab) |
| { |
| - var tabId = sender.tab.id; |
| + tabId = sender.tab.id; |
| if (tabId in frames) |
| { |
| for (var f in frames[tabId]) |
| { |
| if (getFrameUrl(tabId, f) == request.frameUrl) |
| { |
| frameId = f; |
| break; |