в строке 54:

Выделить код

Код:

const fKey = new function () {
    var prefBranch = null;
    var hotkeys = [];

    const getBlankTab = function(url) {
        var i = 0;
        var tabs = gBrowser.mTabContainer.childNodes;
        for (i = 0; i < tabs.length; i++)
        {
            if ((gBrowser.getBrowserForTab(tabs[i]).contentDocument.location == "about:blank") ||
                (gBrowser.getBrowserForTab(tabs[i]).contentDocument.location == "chrome://fastdial/content/fastdial.html") ||
                (gBrowser.getBrowserForTab(tabs[i]).contentDocument.location == url))
                
                return tabs[i];
        }
        return null;    
    };

    const handleShortcutKey = function(aEvent) {
        var curKeyCode = Number(aEvent.keyCode - aEvent.DOM_VK_F1);
        /* DOM_VK_F1 to DOM_VK_F12 */
        if (curKeyCode >= 0 && curKeyCode <= 11) {
            if(hotkeys[curKeyCode].value != undefined &&
                    hotkeys[curKeyCode].value != "") {
                /* enum all tabs */
                var url = hotkeys[curKeyCode].value;
                var tab = getBlankTab(url);
                if (tab == null)
                {
                    gBrowser.selectedTab = gBrowser.addTab(url);
                }
                else
                {
                    gBrowser.selectedTab = tab;
                    gBrowser.loadURI(url);
                }
                aEvent.preventDefault();
                aEvent.stopPropagation();
            }
        }
    };

    const setKeyBinding = function() {

    };

    this.openSetting = function() {
        window.openDialog('chrome://fkeyshortcut/content/setting.xul', 'fKey-settingDialog', 'resizable, centerscreen, chrome', hotkeys);
    }

    this.init = function() {
        var prefSvc = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefService);
        prefBranch = prefSvc.getBranch('fkeyshortcut.');
        hotkeys = eval(prefBranch.getCharPref('hotkey'));
        window.addEventListener('keypress', handleShortcutKey, true);
    };

}

window.addEventListener('load', function() {
        gBrowser.addEventListener("load", fKey.init, true);
        },
        false);

LA_
https://developer.mozilla.org/en/Compon … ox_Context ?

Лучше https://developer.mozilla.org/en/JSON :)

спасибо!
но мне б решение сразу... нужно чужой extension оживить, я в этом не очень понимаю