diff --git a/usr/lib/python3/dist-packages/webengine/gtk3/_inject.py b/usr/lib/python3/dist-packages/webengine/gtk3/_inject.py index f6eee37..69e197e 100644 --- a/usr/lib/python3/dist-packages/webengine/gtk3/_inject.py +++ b/usr/lib/python3/dist-packages/webengine/gtk3/_inject.py @@ -18,13 +18,11 @@ class Inject: code = open(self.abspath('./inject.js'), 'r').read() frame = WebKit2.UserContentInjectedFrames.ALL_FRAMES time = WebKit2.UserScriptInjectionTime.END - lang, charset = env['LANG'].split('.') code = code.replace("'{{env}}'", json.dumps(env)) code = code.replace("{{uuid}}", webview.uuid) code = code.replace("{{app_name}}", webview.app_name) code = code.replace("{{app_version}}", webview.app_version) - code = code.replace("{{lang}}", lang) script = WebKit2.UserScript(code, frame, time, None, None) diff --git a/usr/lib/python3/dist-packages/webengine/gtk3/inject.js b/usr/lib/python3/dist-packages/webengine/gtk3/inject.js index df37359..ba80e6d 100644 --- a/usr/lib/python3/dist-packages/webengine/gtk3/inject.js +++ b/usr/lib/python3/dist-packages/webengine/gtk3/inject.js @@ -212,10 +212,7 @@ class EventEmitter { } } -readonly(navigator, 'language', '{{lang}}') -readonly(navigator, 'languages', ['{{lang}}']) - -window.native = new EventEmitter() +readonly(window, 'native', new EventEmitter()) native.$on('opener_message', (data, uuid) => _postMessage(data, uuid))