Fix bookmarklet bug
authorJakob Cornell <jakob@jcornell.net>
Sat, 4 Jan 2020 07:36:57 +0000 (01:36 -0600)
committerJakob Cornell <jakob@jcornell.net>
Sat, 4 Jan 2020 07:36:57 +0000 (01:36 -0600)
main.py

diff --git a/main.py b/main.py
index 577a6333e13f2a7e9a66a85d6de3cfb10f4dcb2c..ac0aea73e2e56d1d272fe3857aaf7a5db3924e91 100644 (file)
--- a/main.py
+++ b/main.py
@@ -165,8 +165,8 @@ def get_table_bookmarklet(records):
        assert "'" not in table_html
        js_table_literal = "'{}'".format(table_html)
        return (
-               'javascript:function(){document.querySelector(\'[contenteditable=\\\'true\\\']\')'
-               + '.innerHTML+=\'<br/>\'+' + js_table_literal + '+\'<br/>\';}()'
+               'javascript:(function(){document.querySelector(\'[contenteditable=\\\'true\\\']\')'
+               + '.innerHTML+=\'<br/>\'+' + js_table_literal + '+\'<br/>\';})()'
        )