instagram Default Volume

Set your Instagram videos default volumes

< 腳本instagram Default Volume的回應

提問/評論

§
發表於:2025-08-03

Patch: Replace line 27 const targetElement = document.querySelector('.x1iyjqo2.xh8yej3');
with const targetElement = document.querySelector('video').parentElement.parentElement.parentElement.parentElement;

I also replaced the load event with a wait function because it did not always apply.

function updateVolume() {
  ...
}

var retry = 0;
function wait() {
    if(retry++ > 100) {
        console.log("Failed to find video control after 100 attempts");
        return;
    }
    if(document.getElementsByTagName("video").length == 0) {
        setTimeout(wait,100);
    }
    else {
        updateVolume();
    }
}
wait();

發表回覆

登入以回覆