INNER CODE UNIT · JavaScript

Mediator

mozilla/firefox-translations · extension/mediator.js:17

class Mediator {

    constructor() {
        this.translation = null;
        this.languageDetection = new LanguageDetection();
        this.inPageTranslation = new InPageTranslation(this);
        this.outboundTranslation = null;
        this.isStarted = false;
        browser.runtime.onMessage.addListener(this.bgScriptsMessageListener.bind(this));
        this.translationBarDisplayed = false;
        this.statsMode = false;
        this.isMainFrame = window.self === window.top;
    }

    init() {
        browser.runtime.sendMessage({ command: "monitorTabLoad" });
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…