Translator

Press (F2) to Translate.

当前为 2020-10-27 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @version 4.0.2.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. // @include *://*
  10. // @exclude *gf.qytechs.cn/*scripts/4610-*
  11. // @exclude *gf.qytechs.cn/*scripts/4610/*
  12. // @license CC BY-NC-ND 4.0; http://creativecommons.org/licenses/by-nc-nd/4.0/
  13. // @namespace https://gf.qytechs.cn/users/4792
  14. // @supportURL https://gf.qytechs.cn/scripts/4610/feedback
  15. // @compatible Chrome tested with Tampermonkey
  16. // @grant GM_notification
  17. // ==/UserScript==
  18.  
  19. if (GM_info.script.copyright.includes(GM_info.script.namespace)) {
  20. // nothing
  21. }
  22. else {
  23. location.href = GM_info.script.supportURL.replace("feedback", "");
  24. alert("Please install the Orginal Version");
  25. }
  26. // ===============
  27.  
  28. // ==Key==
  29. document.onkeydown = openPage;
  30.  
  31. function openPage(e) {
  32. e = window.event ? event : e;
  33. if (e.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. onclick: function () {
  39. location.href = GM_info.script.supportURL;
  40. },
  41. });
  42. console.log("Post a review, comment, or question\n" + GM_info.script.supportURL + "\n\nCopyright " + GM_info.script.copyright);
  43. }
  44. }
  45. // ==============

QingJ © 2025

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