We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5225cff commit c5000b8Copy full SHA for c5000b8
javascripts/Google Translate.js
@@ -0,0 +1,12 @@
1
+"use strict";
2
+var selection;
3
+if (window.getSelection) {
4
+ selection = window.getSelection().toString();
5
+} else if (document.selection && document.selection.type != "Control") {
6
+ selection = document.selection.createRange().text;
7
+}
8
+if (selection === undefined) {
9
+ location.href = 'https://translate.google.com/translate?langpair=auto%7Cauto&u=' + encodeURIComponent(location.href);
10
+} else {
11
+ location.href = 'https://translate.google.com/translate?langpair=auto%7Cauto&ie=' + encodeURIComponent(document.characterSet) + '&text=' + encodeURIComponent(selection);
12
javascripts/To English.js
0 commit comments