| Index: lib/devtools.js | 
| =================================================================== | 
| --- a/lib/devtools.js | 
| +++ b/lib/devtools.js | 
| @@ -248,17 +248,17 @@ | 
| let panel = panels.get(tabId); | 
|  | 
| // Reloading the tab is the only way that allows bypassing all caches, in | 
| // order to see all requests in the devtools panel. Reloading must not be | 
| // performed before the tab changes to "loading", otherwise it will load the | 
| // previous URL. | 
| if (panel && panel.reload) | 
| { | 
| -    chrome.tabs.reload(tabId, {bypassCache: true}); | 
| +    browser.tabs.reload(tabId, {bypassCache: true}); | 
|  | 
| panel.reload = false; | 
| panel.reloading = true; | 
| } | 
| } | 
|  | 
| function updateFilters(filters, added) | 
| { | 
| @@ -329,26 +329,26 @@ | 
| } | 
|  | 
| function onSubscriptionAdded(subscription) | 
| { | 
| if (subscription instanceof SpecialSubscription) | 
| updateFilters(subscription.filters, true); | 
| } | 
|  | 
| -chrome.runtime.onConnect.addListener(newPort => | 
| +browser.runtime.onConnect.addListener(newPort => | 
| { | 
| let match = newPort.name.match(/^devtools-(\d+)$/); | 
| if (!match) | 
| return; | 
|  | 
| let inspectedTabId = parseInt(match[1], 10); | 
| let localOnBeforeRequest = onBeforeRequest.bind(); | 
|  | 
| -  chrome.webRequest.onBeforeRequest.addListener( | 
| +  browser.webRequest.onBeforeRequest.addListener( | 
| localOnBeforeRequest, | 
| { | 
| urls: ["http://*/*", "https://*/*"], | 
| types: ["main_frame"], | 
| tabId: inspectedTabId | 
| } | 
| ); | 
|  | 
| @@ -358,17 +358,17 @@ | 
| FilterNotifier.on("filter.added", onFilterAdded); | 
| FilterNotifier.on("filter.removed", onFilterRemoved); | 
| FilterNotifier.on("subscription.added", onSubscriptionAdded); | 
| } | 
|  | 
| newPort.onDisconnect.addListener(() => | 
| { | 
| panels.delete(inspectedTabId); | 
| -    chrome.webRequest.onBeforeRequest.removeListener(localOnBeforeRequest); | 
| +    browser.webRequest.onBeforeRequest.removeListener(localOnBeforeRequest); | 
|  | 
| if (panels.size == 0) | 
| { | 
| ext.pages.onLoading.removeListener(onLoading); | 
| FilterNotifier.off("filter.added", onFilterAdded); | 
| FilterNotifier.off("filter.removed", onFilterRemoved); | 
| FilterNotifier.off("subscription.added", onSubscriptionAdded); | 
| } | 
|  |