Allow user to override lookup.js

This commit is contained in:
Kovid Goyal 2025-12-30 07:59:20 +05:30
parent 0f5a7d9e40
commit e81fa6ac0e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -244,7 +244,7 @@ def create_profile():
ans = QWebEngineProfile('viewer-lookup', QApplication.instance())
ans.setHttpUserAgent(random_user_agent(allow_ie=False))
setup_profile(ans)
js = P('lookup.js', data=True, allow_user_override=False)
js = P('lookup.js', data=True, allow_user_override=True)
insert_scripts(ans, create_script('lookup.js', js, injection_point=QWebEngineScript.InjectionPoint.DocumentCreation))
s = ans.settings()
s.setDefaultTextEncoding('utf-8')