Set your Instagram videos default volumes
< 脚本 instagram Default Volume 的反馈
Patch: Replace line 27 const targetElement = document.querySelector('.x1iyjqo2.xh8yej3'); with const targetElement = document.querySelector('video').parentElement.parentElement.parentElement.parentElement;
const targetElement = document.querySelector('.x1iyjqo2.xh8yej3');
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();
登录以发布留言。
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.