Skip to content

Instantly share code, notes, and snippets.

@bayashi
Last active September 27, 2021 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bayashi/f69103240deffbc72cc8a6d624665832 to your computer and use it in GitHub Desktop.
Save bayashi/f69103240deffbc72cc8a6d624665832 to your computer and use it in GitHub Desktop.
DeepL JA-EN bookmarklet
javascript:(function(){Q=''+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);if(!Q)Q=prompt("Text?","");A=Q.match(/^[a-zA-Z\-\=\"\!\&\.\,\'\s]+$/)?'en/ja/':'ja/en/';if(Q)open('https://www.deepl.com/translator#'+A+encodeURIComponent(Q),'_blank');})()
@FlominatorTM
Copy link

Cool thing, also recognizes other languages. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment