Instagram Video Volume Controller

Sets the volume of Instagram videos to 10%.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name            Instagram Video Volume Controller
// @name:ja         Instagramの動画の音量を下げる
// @namespace       https://greasyfork.org/users/1324207
// @match           https://www.instagram.com/*
// @version         1.2
// @author          Lark8037
// @description     Sets the volume of Instagram videos to 10%.
// @description:ja  Instagramの動画の音量を10%にします。
// @license         MIT
// @icon            https://www.instagram.com/favicon.ico
// ==/UserScript==

(() => {
    const v = () => document.querySelectorAll('video').forEach(e => {
        if (e.volume !== 0.1) e.volume = 0.1;
    });
    addEventListener('load', v);
    addEventListener('DOMContentLoaded', v);
    new MutationObserver(v).observe(document, {subtree:1,childList:1});
    v();
})();