var t = content.getSelection().toString();
if(t) {gBrowser.selectedTab = gBrowser.addTab("http://translate.google.com/translate_t?hl=en#auto|zh-CN|"+t);}
else {gBrowser.selectedTab = gBrowser.addTab("http://translate.google.com/translate?u="+content.location);}
firegesture腳本 調(diào)用的谷歌
先裝擴展firegesture,然后把他設(shè)置成一個鼠標(biāo)手勢
已把上面腳本添加進去,我選擇右鍵“向右滑動”怎么調(diào)用不了谷歌翻譯?
https://addons.mozilla.org/en-US/firefox/addon/s3google-translator/
有道翻譯小書簽,很方便
能翻譯整個外文網(wǎng)站的網(wǎng)頁嗎
對啊,最好的是,他可以選擇按照good(好)這樣的形式把難詞標(biāo)注出來
微軟翻譯小書簽
操作dom可以用 content.document 例如獲取head標(biāo)簽的內(nèi)容:
var html = content.document;
html.querySelector("head").innerHTML;