Instagram web RTL

a script to fix rtl on web version of instagram

< 腳本Instagram web RTL的回應

評論:普通 - 腳本能使用,但有一些問題

§
發表於:2021-08-04

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,
});

發表回覆

登入以回復

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址