tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

initializer.js (841B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 "use strict";
      6 
      7 const { BrowserLoader } = ChromeUtils.importESModule(
      8  "resource://devtools/shared/loader/browser-loader.sys.mjs"
      9 );
     10 const require = BrowserLoader({
     11  baseURI: "resource://devtools/client/anti-tracking/",
     12  window,
     13 }).require;
     14 
     15 const {
     16  WebcompatTrackerDebugger,
     17 } = require("resource://devtools/client/anti-tracking/webcompat-tracker-debugger.js");
     18 
     19 window.AntiTracking = {
     20  debugger: null,
     21 
     22  async bootstrap({ commands }) {
     23    this.debugger = new WebcompatTrackerDebugger(commands);
     24  },
     25 
     26  async destroy() {
     27    if (this.debugger) {
     28      await this.debugger.destroy();
     29      this.debugger = null;
     30    }
     31  },
     32 };