parent
430d69f278
commit
a796d1f33f
@ -263,8 +263,6 @@ def qute_history(url):
|
||||
|
||||
return 'text/html', json.dumps(history_data(start_time, offset))
|
||||
else:
|
||||
if not config.val.content.javascript.enabled:
|
||||
return 'text/plain', b'JavaScript is required for qute://history'
|
||||
return 'text/html', jinja.render(
|
||||
'history.html',
|
||||
title='History',
|
||||
|
@ -22,7 +22,7 @@
|
||||
from PyQt5.QtGui import QFont
|
||||
|
||||
from qutebrowser.config import config, configutils
|
||||
from qutebrowser.utils import log, usertypes
|
||||
from qutebrowser.utils import log, usertypes, urlmatch
|
||||
from qutebrowser.misc import objects
|
||||
|
||||
UNSET = object()
|
||||
@ -172,6 +172,11 @@ def init(args):
|
||||
from qutebrowser.browser.webkit import webkitsettings
|
||||
webkitsettings.init(args)
|
||||
|
||||
# Make sure special URLs always get JS support
|
||||
for pattern in ['file://*', 'chrome://*/*', 'qute://*/*']:
|
||||
config.instance.set_obj('content.javascript.enabled', True,
|
||||
pattern=urlmatch.UrlPattern(pattern))
|
||||
|
||||
|
||||
def shutdown():
|
||||
"""Shut down QWeb(Engine)Settings."""
|
||||
|
Loading…
Reference in New Issue
Block a user