summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/injector.py17
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
)