// @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]}`))))
);