Redirect to Google Translator - Forced

Instantaneously redirects you to https://translate.google.com if you search for the word "translator" using your native language.

目前为 2022-08-15 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Redirect to Google Translator - Forced
  3. // @namespace https://greasyfork.org/en/users/670188-hacker09?sort=daily_installs
  4. // @version 3
  5. // @description Instantaneously redirects you to https://translate.google.com if you search for the word "translator" using your native language.
  6. // @author hacker09
  7. // @include *://www.google.*
  8. // @icon https://t2.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://translate.google.com/&size=64
  9. // @run-at document-start
  10. // @grant none
  11. // @noframes
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16. if (location.href.match(/tradutor|^.+trad&.+$|translate|translator|traductor/) !== null) //If the url has the words "tradutor" or "trad" or "translate" or "translator" or "traductor"
  17. { //Starts the if conditon
  18. window.location.replace("https://translate.google.com"); //Redirect to https://translate.google.com
  19. } //Finishes the if conditon
  20. })();