diff options
| author | Sky Leite <sky@leite.dev> | 2023-02-04 00:29:34 -0300 |
|---|---|---|
| committer | Sky Leite <sky@leite.dev> | 2023-02-04 00:29:34 -0300 |
| commit | 4e92d4bfc5652304a6ec0b62e70ab0574ffe159d (patch) | |
| tree | 5ffe3c58db50524fd9018447652a62faa0add1a1 /backend | |
| parent | 1edcc090203f3ca3cb610910f1886d68e29bca88 (diff) | |
| download | decky-loader-4e92d4bfc5652304a6ec0b62e70ab0574ffe159d.tar.gz decky-loader-4e92d4bfc5652304a6ec0b62e70ab0574ffe159d.zip | |
Fix unescaped curly braces in javascript formatting
This would previously throw an error due to `format` interpreting the
curly braces as placeholders
Diffstat (limited to 'backend')
| -rw-r--r-- | backend/injector.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/backend/injector.py b/backend/injector.py index f62ddc48..131dbc4a 100644 --- a/backend/injector.py +++ b/backend/injector.py @@ -261,18 +261,19 @@ class Tab: wrappedjs = ( """ - function scriptFunc() { + function scriptFunc() {{ {js} - } - if (document.readyState === 'loading') { - addEventListener('DOMContentLoaded', () => { + }} + if (document.readyState === 'loading') {{ + addEventListener('DOMContentLoaded', () => {{ scriptFunc(); - }); - } else { + }}); + }} else {{ scriptFunc(); - } + }} """.format( - ) + js=js + ) if add_dom_wrapper else js ) |
