File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 33// @name :zh-CN HTML5 视频音频默认音量
44// @name :zh-TW HTML5 視訊音訊預設音量
55// @name :ru Громкость аудио-видео в формате HTML5 по умолчанию
6- // @version 1.0.4
6+ // @version 1.0.5
77// @author X.I.U
88// @description Avoid being startled by some video/audio with default 100% volume! And support each website to remember the volume separately...
99// @description :zh-CN 避免被一些默认 100% 音量的视频/音频吓一跳(或社死)!且支持各网站分别记住音量...
138138 if ( ! target . controls ) return ; // 如果视频/音频已经有了自己的控件(即没有使用 HTML5 默认的控件),则退出
139139 }
140140 modifyVolume ( target ) ;
141- // 如果没有该属性,则代表是还未监听事件
142- if ( target . dataset . html5VolumeXiu != 'true' ) {
143- target . dataset . html5VolumeXiu = 'true'
144- target . addEventListener ( 'volumechange' , volumeChangeEvent ) ;
141+ if ( ! menu_forcedToEnable ( 'check' ) ) { // 如果未强制当前网站使用全局音量(针对部分不支持调节音量的网站),毕竟不支持音量调节的网站监听音量变化是没有意义的,反而可能会被网站默认静音什么的搞乱
142+ // 如果没有该属性,则代表是还未监听事件
143+ if ( target . dataset . html5VolumeXiu != 'true' ) {
144+ target . dataset . html5VolumeXiu = 'true'
145+ target . addEventListener ( 'volumechange' , volumeChangeEvent ) ;
146+ }
145147 }
146148 }
147149
You can’t perform that action at this time.
0 commit comments