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()
|
return page.recentlyAudible()
|
||||||
|
|
||||||
def _on_url_changed(self):
|
def _on_url_changed(self):
|
||||||
urlstr = self._tab.url().toString(QUrl.RemoveUserInfo)
|
url = self._tab.url()
|
||||||
muted_url = config.instance.get('content.mute', url=urlstr)
|
is_audible = config.instance.get('content.audible_default', url=url)
|
||||||
self.set_muted(muted_url is not None)
|
self.set_muted(not is_audible)
|
||||||
|
|
||||||
|
|
||||||
class _WebEnginePermissions(QObject):
|
class _WebEnginePermissions(QObject):
|
||||||
|
@ -746,13 +746,11 @@ content.xss_auditing:
|
|||||||
Suspicious scripts will be blocked and reported in the inspector's
|
Suspicious scripts will be blocked and reported in the inspector's
|
||||||
JavaScript console.
|
JavaScript console.
|
||||||
|
|
||||||
content.mute:
|
content.audible_default:
|
||||||
default: null
|
default: true
|
||||||
type:
|
type: Bool
|
||||||
name: String
|
desc: Play sounds automatically in web pages.
|
||||||
none_ok: true
|
|
||||||
supports_pattern: true
|
supports_pattern: true
|
||||||
desc: List of URLs muted by default.
|
|
||||||
|
|
||||||
# emacs: '
|
# emacs: '
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user