不要翻译 OSMWIKI 的tag!

避免浏览器翻译 OpenStreetMap Wiki 上的tag。

  1. // ==UserScript==
  2. // @name Don't translate tags in OSMWIKI!
  3. // @name:zh-CN 不要翻译 OSMWIKI 的tag!
  4. // @name:zh-TW 不要翻譯 OSMWIKI 的tag!
  5. // @name:ja OSMWIKIタグを翻訳しないでください!
  6. // @namespace https://www.jianshu.com/u/8f333703e491
  7. // @version 0.2
  8. // @description Prevent tags in OpenStreetMap Wiki from being translated by browser.
  9. // @description:zh-CN 避免浏览器翻译 OpenStreetMap Wiki 上的tag。
  10. // @description:zh-TW 避免瀏覽器翻譯 OpenStreetMap Wiki 上的tag。
  11. // @description:ja OpenStreetMap Wikiのタグがブラウザーによって翻訳されないようにします。
  12. // @icon https://www.openstreetmap.org/favicon.ico
  13. // @author Xiao_Le
  14. // @include *://wiki.openstreetmap.org*
  15. // @match *://wiki.openstreetmap.org*
  16. // ==/UserScript==
  17. window.onload = function(){
  18. $('p tt').each(function (i, e) {$(this).attr('id', 'tag');});
  19. $('p tt').each(function (i, e) {$(this).attr('class', 'mw-content-ltr notranslate');});
  20. $('li tt').each(function (i, e) {$(this).attr('id', 'tag');});
  21. $('li tt').each(function (i, e) {$(this).attr('class', 'mw-content-ltr notranslate');});
  22. $('td tt').each(function (i, e) {$(this).attr('id', 'tag');});
  23. $('td tt').each(function (i, e) {$(this).attr('class', 'mw-content-ltr notranslate');});
  24. }