Skip to content

Instantly share code, notes, and snippets.

@caoyue
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caoyue/3abd20ab8da6e404cd1a to your computer and use it in GitHub Desktop.
Save caoyue/3abd20ab8da6e404cd1a to your computer and use it in GitHub Desktop.
bing cloud dict bookmarklet
javascript:(function(){javascript:(function(){if(document.location.protocol=="https:"){alert("bing bookmarklet: https not supported!");}else{script=document.createElement('script');script.src='http://dict.bing.com.cn/cloudwidget/Scripts/Generated/BingTranslate_Hover_Phrase_Selection_ShowIcon.js';script.onload=function(){BingCW.Init({AppID:"dict",MachineTranslation:true,WebDefinition:true});};document.body.appendChild(script);}})();})();
  • api via Bing
  • made by @caoyue
javascript: (function() {
if (document.location.protocol == "https:") {
alert("bing bookmarklet: https not supported!");
} else {
script = document.createElement('script');
script.src = 'http://dict.bing.com.cn/cloudwidget/Scripts/Generated/BingTranslate_Hover_Phrase_Selection_ShowIcon.js';
script.onload = function() {
BingCW.Init({
AppID: "dict",
MachineTranslation: true,
WebDefinition: true
});
};
document.body.appendChild(script);
}  
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment