Translator

Press (F2) to Translate.

目前为 2020-10-30 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @version 4.0.3.5
  3. // @name Translator
  4. // @name:de Übersetzer
  5. // @description Press (F2) to Translate.
  6. // @description:de Drücken Sie (F2) zum übersetzen.
  7. // @author wack.3gp
  8. // @copyright 2019+ , wack.3gp (https://gf.qytechs.cn/users/4792)
  9. // @namespace https://gf.qytechs.cn/users/4792
  10. // @icon https://translate.google.com/favicon.ico
  11. // @supportURL https://gf.qytechs.cn/scripts/4610/feedback
  12. // @license CC BY-NC-ND 4.0; http://creativecommons.org/licenses/by-nc-nd/4.0/
  13. // @noframes
  14. // @compatible Chrome tested with Tampermonkey
  15. // @contributionURL https://www.paypal.com/donate?hosted_button_id=425BQ83R36BGL
  16. // @contributionAmount €1.00
  17. // @grant GM_notification
  18. // @include *
  19. // @exclude /^[a-z]{4}.*\/greasyfork\.org\/.*\/4610.*$
  20. // ==/UserScript==
  21.  
  22. if (GM_info.script.copyright.includes(GM_info.script.namespace)) {
  23. // nothing
  24. }
  25. else {
  26. location.href = GM_info.script.supportURL.replace("feedback", "");
  27. alert("Please install the Orginal Version");
  28. }
  29. // ===============
  30.  
  31. document.onkeydown = openPage;
  32.  
  33. function openPage(F2) {
  34. F2 = window.event ? event : F2;
  35. if (F2.keyCode == 113) {
  36. location.href = "http://translate.google.com/translate?sl=auto&u=" + window.location;
  37. GM_notification({
  38. title: GM_info.script.name,
  39. text: "Post a review, comment, or question",
  40. timeout: "10000",
  41. onclick: function () {
  42. location.href = GM_info.script.supportURL;
  43. },
  44. });
  45. }
  46. }
  47.  
  48. if (window.location.host.includes('translate.google')) {
  49. console.log("Post a review, comment, or question\n" + GM_info.script.supportURL + "\n\nCopyright " + GM_info.script.copyright);
  50. }
  51. // ==============

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址