Redirect to Google Translator

Instead of using the small translator on https://google.com get redirected to https://translate.google.com

目前為 2021-04-06 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Redirect to Google Translator
// @namespace    GoogleTranslatorRedirector
// @version      0.2
// @description  Instead of using the small translator on https://google.com get redirected to https://translate.google.com
// @author       hacker09
// @include      *://www.google.*
// @icon         https://api.faviconkit.com/www.google.com/57
// @run-at       document-end
// @grant        none
// @noframes
// ==/UserScript==

(function() {
  'use strict';
  if (document.querySelector("#tw-main") !== null) // If the small translator widget exists on the page
  { //Starts the if conditon
    window.location.replace("https://translate.google.com"); //Redirect to https://translate.google.com
  } //Finishes the if conditon
})();