[?]ネイティオ語自動翻訳

    
      
  • // @title Mastodon - n7m
    // @description トゥート中の3文字以上の英字列をnumeronymに変換します。
    // @include https://*/web/*
    // @license MIT License
    // @javascript_url
    
    // https://github.com/timrwood/n7m
    
    ((target, p) => (new MutationObserver(m => m.forEach(r => p(r.addedNodes))).observe(target, {childList: 1, subtree: 1}), p([target])))(
      document.querySelector('.columns-area'),
      ns=>
      Array.from(ns)
      .reduce((p, c) => p.concat(c.querySelectorAll ? Array.from(c.querySelectorAll('.status__content, .status__content p, p>span')) : []), [])
      .forEach(e=>
        Array.from(e.childNodes, n=> n.nodeType === Node.TEXT_NODE && (n.textContent= n.textContent.replace(/[a-z]{4,}/gi, s => `${s[0]}${s.length-2}${s[s.length-1]}`))))
    );
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2018/01/07 00:23:09 - 2018-01-07
  2. 2017/12/13 22:57:47 - 2017-12-13
  3. 2017/12/13 22:51:14 - 2017-12-13
  4. 2017/12/13 22:50:38 - 2017-12-13