Fix mute_per_domain feature
Users can allow sounds to be played by default while specifying domains not allowed to play sounds, or the opposite.
This commit is contained in:
parent
9d91c22236
commit
d324448039
@ -653,9 +653,9 @@ class WebEngineAudio(browsertab.AbstractAudio):
|
||||
return page.recentlyAudible()
|
||||
|
||||
def _on_url_changed(self):
|
||||
urlstr = self._tab.url().toString(QUrl.RemoveUserInfo)
|
||||
muted_url = config.instance.get('content.mute', url=urlstr)
|
||||
self.set_muted(muted_url is not None)
|
||||
url = self._tab.url()
|
||||
is_audible = config.instance.get('content.audible_default', url=url)
|
||||
self.set_muted(not is_audible)
|
||||
|
||||
|
||||
class _WebEnginePermissions(QObject):
|
||||
|
@ -746,13 +746,11 @@ content.xss_auditing:
|
||||
Suspicious scripts will be blocked and reported in the inspector's
|
||||
JavaScript console.
|
||||
|
||||
content.mute:
|
||||
default: null
|
||||
type:
|
||||
name: String
|
||||
none_ok: true
|
||||
content.audible_default:
|
||||
default: true
|
||||
type: Bool
|
||||
desc: Play sounds automatically in web pages.
|
||||
supports_pattern: true
|
||||
desc: List of URLs muted by default.
|
||||
|
||||
# emacs: '
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user