Break greasemonkey_wrapper lines differently

This commit is contained in:
Florian Bruhin 2018-03-19 09:13:50 +01:00
parent 8ae3047f2a
commit f2864c6253

View File

@ -104,12 +104,12 @@ class GreasemonkeyScript:
browser's debugger/inspector will not match up to the line browser's debugger/inspector will not match up to the line
numbers in the source script directly. numbers in the source script directly.
""" """
return jinja.js_environment.get_template( template = jinja.js_environment.get_template('greasemonkey_wrapper.js')
'greasemonkey_wrapper.js').render( return template.render(
scriptName="/".join([self.namespace or '', self.name]), scriptName="/".join([self.namespace or '', self.name]),
scriptInfo=self._meta_json(), scriptInfo=self._meta_json(),
scriptMeta=self.script_meta, scriptMeta=self.script_meta,
scriptSource=self._code) scriptSource=self._code)
def _meta_json(self): def _meta_json(self):
return json.dumps({ return json.dumps({