MCPcopy Create free account
hub / github.com/XIU2/UserScript / customDefaultVolume

Function customDefaultVolume

HTML5Volume.user.js:163–168  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

161
162 // 修改全局默认音量
163 function customDefaultVolume() {
164 let newValue = parseFloat(prompt('修改全局默认音量,不影响各网站记住的音量,修改后当前网页立即生效~\n范围:0~100 (即 0%~100%,不需要加 % 百分号)\n默认:30', GM_getValue('menu_defaultVolume', 30)));
165 if (!Number.isNaN(newValue) && newValue >= 0 && newValue <= 100) {GM_setValue('menu_defaultVolume', newValue);}
166 currentPage(); // 重置当前网页的音量
167 registerMenuCommand(); // 重新注册菜单(刷新菜单上的音量值)
168 }
169
170
171 // 修改当前网站默认音量 (针对不支持调节音量的网站)

Callers 1

registerMenuCommandFunction · 0.85

Calls 2

currentPageFunction · 0.85
registerMenuCommandFunction · 0.70

Tested by

no test coverage detected