|
|
|
|
|
by hnben
1020 days ago
|
|
highlight a string on a website, then click this to translate with google javascript:(function() { const baseUrl = "https://translate.google.com/?op=translate&sl=auto&tl=de&text="; const textRaw = window.getSelection(); const text = encodeURIComponent(textRaw); console.log("selected text: ", text, textRaw); window.open(baseUrl + text) })();
(maybe adjust the target language in the url) |
|
I feel like there should be something like a bookmarklet store, similar to the extensions, or userscripts, right?