aboutsummaryrefslogtreecommitdiffstats
path: root/js/vapi-background.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/vapi-background.js')
-rw-r--r--js/vapi-background.js41
1 files changed, 0 insertions, 41 deletions
diff --git a/js/vapi-background.js b/js/vapi-background.js
index a7cc5f3..3035556 100644
--- a/js/vapi-background.js
+++ b/js/vapi-background.js
@@ -534,47 +534,6 @@
}
};
- vAPI.net = {};
-
- vAPI.net.registerListeners = function () {
- this.onBeforeRequest.types = this.onBeforeRequest.types
- ? new Set(this.onBeforeRequest.types)
- : null;
-
- this.onBeforeSendHeaders.types = this.onBeforeSendHeaders.types
- ? new Set(this.onBeforeSendHeaders.types)
- : null;
-
- let shouldLoadListenerMessageName = location.host + ':shouldLoad';
- let shouldLoadListener = function (e) {
- let details = e.data;
- let pendingReq = httpObserver.createPendingRequest(details.url);
- pendingReq.rawType = details.rawType;
- pendingReq.tabId = vAPI.tabs.manager.tabIdFromTarget(e.target);
- };
-
- // https://github.com/gorhill/uMatrix/issues/200
- // We need this only for Firefox 34 and less: the tab id is derived from
- // the origin of the message.
- if (!vAPI.modernFirefox) {
- vAPI.messaging.globalMessageManager
- .addMessageListener(shouldLoadListenerMessageName,
- shouldLoadListener);
- }
-
- httpObserver.register();
-
- vAPI.addCleanUpTask(function () {
- if (!vAPI.modernFirefox) {
- vAPI.messaging.globalMessageManager
- .removeMessageListener(shouldLoadListenerMessageName,
- shouldLoadListener);
- }
-
- httpObserver.unregister();
- });
- };
-
vAPI.toolbarButton = {
id: location.host + '-button',
type: 'view',