Translator

Press (F2) to Translate.

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

  1. // ==UserScript==
  2. // @version 4.0.3.3
  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. // @grant GM_notification
  16. // @include *://*
  17. // @exclude /^[a-z]{4}.*\/greasyfork\.org\/.*\/4610.*$
  18. // ==/UserScript==
  19.  
  20. if (GM_info.script.copyright.includes(GM_info.script.namespace)) {
  21. // nothing
  22. }
  23. else {
  24. location.href = GM_info.script.supportURL.replace("feedback", "");
  25. alert("Please install the Orginal Version");
  26. }
  27. // ===============
  28.  
  29. document.onkeydown = openPage;
  30.  
  31. function openPage(F2) {
  32. F2 = window.event ? event : F2;
  33. if (F2.keyCode == 113) {
  34. location.href = "http://translate.google.com/translate?sl=auto&u=" + window.location;
  35. GM_notification({
  36. title: GM_info.script.name,
  37. text: "Post a review, comment, or question",
  38. timeout: "10000",
  39. onclick: function () {
  40. location.href = GM_info.script.supportURL;
  41. },
  42. });
  43. }
  44. }
  45.  
  46. if (window.location.host.includes('translate.google')) {
  47. console.log("Post a review, comment, or question\n" + GM_info.script.supportURL + "\n\nCopyright " + GM_info.script.copyright);
  48. }
  49. // ==============

QingJ © 2025

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