2011-09-26 44 views

回答

2

我不認爲這是可能的Chrome加載項。至於Firefox - 當然,在主瀏覽器窗口(browser.xul)中有<command> element,ID Browser:SavePage,在one of the include files中定義。您可以爲此元素上的command事件添加偵聽器,例如:

document.getElementById('Browser:SavePage').addEventListener('command', function(e) { 
    console.log('doing command', 'id:', e.target.id, 'e:', e); 
}, false); 
相關問題