From 77221dd2c4abbc9a9071fbf62527666f0de0bc56 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Tue, 13 Aug 2019 09:59:09 +0100 Subject: [PATCH] Enable javascript and cookie store by default on barium This is a work machine used only for work. Fingerprinting be dammed --- states/qutebrowser/files/config.py | 12 ++++++++---- states/qutebrowser/init.sls | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/states/qutebrowser/files/config.py b/states/qutebrowser/files/config.py index 515a723..6cf70b1 100644 --- a/states/qutebrowser/files/config.py +++ b/states/qutebrowser/files/config.py @@ -2,8 +2,6 @@ config.load_autoconfig() c.auto_save.session = True c.content.cookies.accept = 'no-3rdparty' -c.content.cookies.store = False -c.content.javascript.enabled = False c.content.images = True c.editor.command = ['urxvt', '-e', 'vim', '{file}'] c.tabs.position = 'left' @@ -12,16 +10,22 @@ c.url.searchengines = {'DEFAULT': 'https://duckduckgo.com/?q={}'} c.messages.timeout = 5000 c.tabs.background = True +{% if grains['host'] != 'barium' %} +c.content.javascript.enabled = False config.bind(',ej', 'spawn --userscript noscript_enable') config.bind(',dj', 'spawn --userscript noscript_disable') +c.content.cookies.store = False + +# Allow JS and cookies on own domain +config.set('content.javascript.enabled', True, '*.friedersdorff.com') +{% endif %} + config.bind(',zl', 'spawn --userscript qute-pass --dmenu-invocation bemenu') config.bind(',zul', 'spawn --userscript qute-pass --dmenu-invocation bemenu --username-only') config.bind(',zpl', 'spawn --userscript qute-pass --dmenu-invocation bemenu --password-only') config.bind(',zol', 'spawn --userscript qute-pass --dmenu-invocation bemenu --otp-only') -# Allow JS and cookies on own domain -config.set('content.javascript.enabled', True, '*.friedersdorff.com') # Fingerprinting protection c.content.headers.accept_language = 'en-US,en;q=0.5' diff --git a/states/qutebrowser/init.sls b/states/qutebrowser/init.sls index a511ddd..c8a40ae 100644 --- a/states/qutebrowser/init.sls +++ b/states/qutebrowser/init.sls @@ -66,6 +66,7 @@ qutebrowser config: - source: salt://qutebrowser/files/config.py - user: {{ grains['user'] }} - group: {{ grains['user'] }} + - template: jinja - mode: 640 - require: - file: qute config dir -- 2.46.2