给你的opera浏览器增加“必应”云词典
Tofloor
poster avatar
debian
deepin
2012-02-26 19:39
Author
写在最前面,这不是我的原创,以下步骤完全来源于网络。我根据以下做法完全实现了页面选中文字后右键鼠标“必应云词典”后即可对页面上的词、短句进行即进翻译,谢谢那些不停打码又自愿共享的辛苦劳作的人士!!!
先上图,再给出方法:
选区_001.png
1、在.opera下新建文件夹menu
2、在/usr/share/opera/ui 找到standard_menu.ini 复制这个文件到新建的menu内,然后再对复制过来的文件进行编辑。
3、找到[Hotclick Popup Menu]字段,在------1和------2之间添加如下代码:
  1. Item, "必应云词典 "="go to page*:(function(a,b){a.getElementById('bing_cw')||(b=a.createElement('script'),b.id='bing_cw',b.0nload=function(){BingCW.Init({MachineTranslation:true,WebDefinition:true})},b.src='http://dict.bing.com.cn/cloudwidget/Scripts/Generated/BingTranslate_Hover_Phrase_Selection_ShowIcon.js',a.head.appendChild(b))}(document))", , , "News Read""
Copy the Code
4、查看opera:config  Menu Configuration指定的文件夹路径是否为"/home/用户名/.opera/menu/standard_menu.ini",如果不同请改为此路径。
5、重启opera后碰到需要即时翻译的短句或词,直接右键选“必应云词典”点击后,再选择所需翻译的东西即可。
Reply Favorite View the author
All Replies
1137588860
deepin
2012-04-14 00:15
#1
这个太好用了   我还到处找插件  都不好用    这个很赞   竟然没有人回啊
Reply View the author
1137588860
deepin
2012-04-14 06:19
#2
统统都在这里了  修改菜单配置文件
[Document Popup Menu]下添加一条
  1. Submenu, "词典/翻译", Translation Menu , , "News Read"
Copy the Code
然后最后添加一段
  1. [Translation Menu]
  2. Item, "QQ云词典 "="Go to page,*:void((function(d){if(!!d){d.toggle();return;};var src='http://dict.qq.com/cloudgetjs';var e=document.createElement('script');e.setAttribute('src',src);document.getElementsByTagName('head')[0].appendChild(e);})(window.QQCloudDict))", , , "News Read""
  3. Item, "小D划词(可翻英、日文)"="Go to page,*:void((function(){hjelm=document.createElement('script');hjelm.setAttribute('src','http://dict.hjenglish.com/js/dict.js');document.body.appendChild(hjelm);})())", , , "News Read""
  4. Item, "Dict划词助手"="Go to page,*:void((function() {var element=document.createElement('script'); element.setAttribute('src','http://dict.cn/hc/init.php'); document.body.appendChild(element);})())", , , "News Read""
  5. Item, "有道翻译"="Go to page, "http://fanyi.youdao.com/WebpageTranslate?keyfrom=webfanyi.top&url=%u&type=AUTO", ,, "News Read""
  6. Item, "有道翻译工具"=Go to page,*: void((function() {var element = document.createElement('script');element.id = 'outfox_seed_js';element.charset = 'utf-8',element.setAttribute('src', 'http://fanyi.youdao.com/web2/seed.js?' + Date.parse(new Date()));document.body.appendChild(element);})())", , , "News Read""
  7. Item, "谷歌翻译工具"="Go to page,*:var t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));var e=(document.charset||document.characterSet);if(t!=''){location.href='http://translate.google.cn/?text='+t+'&hl=zh-CN&langpair=auto|zh-CN&tbb=1&ie='+e;}else{location.href='http://translate.google.cn/translate?u='+encodeURIComponent(location.href)+'&hl=zh-CN&langpair=auto|zh-CN&tbb=1&ie='+e;};", , , "News Read""
  8. Item, "必应翻译工具"="Go to page,*:(function(){var s = document.createElement('script'); s.type = 'tex*'; s.src = 'http://labs.microsofttranslator.com/bookmarklet/default.aspx?f=js&to=zh-chs'; document.body.insertBefore(s, document.body.firstChild);})()", , , "News Read""
Copy the Code
Reply View the author
1137588860
deepin
2012-04-14 06:20
#3
都是云翻译工具  所以必须在线  楼上内容转自http://bbs.kafan.cn/thread-1131121-1-1.html
Reply View the author
1137588860
deepin
2012-04-15 06:49
#4
不过qq云词典似乎更好用   不用  任何代码
Reply View the author