Greasy Fork is available in English.
a script to fix rtl on web version of instagram
< 脚本Instagram web RTL的反馈
Cleaned up the code
"use strict"; const observer = new MutationObserver(function (mutations) { mutations.forEach(function (mutation) { mutation.addedNodes.forEach(function (node) { const textElm = node.querySelector("div.C4VMK > span"); if (textElm !== null) { textElm.setAttribute("dir", "auto"); textElm.setAttribute("style", "display: inline-block; text-align: start;"); } }); }); }); observer.observe(document, { childList: true, subtree: true, attributes: true, characterData: false, });
登录以发表回复。
Cleaned up the code