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:
cauimsouza 2018-09-04 16:40:05 +02:00
parent 9d91c22236
commit d324448039
2 changed files with 7 additions and 9 deletions

View File

@ -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):

View File

@ -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: '