Remove Google search translate

Removes the Google translate widget from Reddit

目前為 2025-01-17 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Remove Google search translate
// @namespace    http://google.com/
// @version      2025-01-16
// @description  Removes the Google translate widget from Reddit
// @license      MIT
// @author       VampiroMedicado
// @match        https://*.translate.goog/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=google.com
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';
    const protocol = window.location.protocol;
    const host = window.location.host;
    const pathname = window.location.pathname;
    const match = window.location.hostname.match('(.*)\.translate\.goog');
    if (match[1]) {
        const newHost = match[1].replace('-', '.');
        window.location.replace(`${protocol}//${newHost}${window.location.pathname}`);
    }
})();

QingJ © 2025

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