window.addEventListener("load", function() {
    var transbar = new window.Tabzilla.infobar('transbar', 'Translation Bar');

    var userLangs = navigator.languages;
    var pageLang = document.documentElement.lang;

    if (transbar.disabled || !userLangs || !pageLang) {
        console.log("Nothing to do here");
        return false;
    }

    // Normalize the user language in the form of ab or ab
    var normalize = function (lang) {
        return lang.replace(/^(\w+)(?:-\w+)?$/, function (m, p1) {
            return p1.toLowerCase();
        });
    };

    // Normalize every language for easier comparison
    userLangs = $.map(userLangs, function (lang) { return normalize(lang); });
    pageLang = normalize(pageLang);

    // If the page language is the user's primary language, there is nothing
    // to do here
    if (pageLang === userLangs[0]) {
        console.log("Already on primary lang");
        return false;
    }

    var availableLangs = [];
    var $links = $('link[hreflang]');

    if ($links.length) {
        $links.each(function () {
            availableLangs[normalize(this.hreflang)] = this;
        });
    }

    // Compare the user's accept languages against the page's current
    // language and other available languages to find the best language
    $.each(userLangs, function(index, userLang) {
        if (pageLang === userLang) {
            offeredLang = 'self';
            return false; // Break the loop
        }

        if (userLang in availableLangs) {
            offeredLang = userLang;
            return false; // Break the loop
        }
    });

    // If the page language is one of the user's secondary languages and no
    // other higher-priority language cannot be found in the translations,
    // there is nothing to do
    if(offeredLang == 'self' || !offeredLang) {
        console.log("There's no better lang");
        return false;
    }

    // Do not show Chrome's built-in Translation Bar    
    $('head').append('<meta name="google" value="notranslate">');

    transbar.onaccept = {
        trackAction: '',
        trackLabel: offeredLang,
        callback: function () {
            var element = availableLangs[offeredLang];

            location.href = element.href;
        }
    };

    // Fetch the localized strings and show the Translation Bar
    $.ajax({ url: 'https://mozorg.cdn.mozilla.net/' + offeredLang + '/tabzilla/transbar.jsonp',
             cache: true, crossDomain: true, dataType: 'jsonp',
             jsonpCallback: "_", success: function (str) {
        transbar.show(str).attr({
            'lang': offeredLang,
            'dir': ($.inArray(offeredLang, ['he', 'ar', 'fa', 'ur']) > -1) ? 'rtl' : 'ltr'
        });
    }});
});

@@ -270,51 +270,8 @@
 ) %7B%0A
-        console.log(%22Nothing to do here%22);%0A
     
@@ -351,14 +351,8 @@
 f ab
- or ab
 %0A   
@@ -824,76 +824,79 @@
     
-console.log(%22Already on primary lang%22)
+return false
 ;%0A    
+%7D%0A%0A
     
-return false;%0A    %7D%0A
+// Get the available translation from the page
 %0A   
@@ -1627,19 +1627,18 @@
 nguages 
-and
+or
  no%0A    
@@ -1650,24 +1650,8 @@
 her 
-higher-priority 
 lang
@@ -1658,19 +1658,16 @@
 uage can
-not
  be foun
@@ -1688,23 +1688,16 @@
 lations,
-%0A    //
  there i
@@ -1764,55 +1764,8 @@
 ) %7B%0A
-        console.log(%22There's no better lang%22);%0A
     

Remove logging from the transbar script