Google translation replace character

press F5

目前为 2018-07-19 提交的版本。查看 最新版本

// ==UserScript==
// @name         Google translation replace character
// @namespace    https://translate.google.cn/*
// @version      0.1
// @description  press F5
// @author       quz
// @match        https://*translate.google.*/*
// @include      https://*translate.google.*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    //you can change what you want
    var txt = "";
    txt = document.getElementById("source").value;
    //去除空格
    if(txt.indexOf("\n"))
    {
        txt = txt.replace(/\n/g," ");
    }

    //按句子分段
    if(txt.indexOf("."))
    {
        txt = txt.replace(/\. /g,".\n\n");
    }
    document.getElementById("source").value = txt;
})();

QingJ © 2025

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