Greasy Fork 支持简体中文。

Forced zh-TW for translate.google

Force setting Traditional Chinese as the target language, reject Simplified Chinese

  1. // ==UserScript==
  2. // @name Forced zh-TW for translate.google
  3. // @namespace https://greasyfork.org/zh-TW/scripts/399503-forced-setting-zh-tw-for-asian-languages-of-translate-google
  4. // @namespace http://tampermonkey.net/
  5. // @version 0.11
  6. // @description Force setting Traditional Chinese as the target language, reject Simplified Chinese
  7. // @author You
  8. // @match translate.google.com/*
  9. // @match translate.google.com.tw/*
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. chkLang()
  14.  
  15. window.onclick = function() {chkLang()}
  16.  
  17. function chkLang() {
  18. const cURL = new URL(window.location.href)
  19. if (cURL.href.search("tl=zh-CN") != -1) {
  20. cURL.href = cURL.href.replace(/tl=zh-CN/g,"tl=zh-TW")
  21. window.location.href = cURL.href
  22. //location.replace(cURL.href)
  23. location.reload()
  24. }
  25. }