Yes the middleware injects the script tag.
On Apr 17, 2014 11:20 PM, "Natim" <notifications@github.com> wrote:

> In django_js_error_hook/middleware.py:
>
> > +            'Content-Type', '').split(';')[0]
> > +
> > +        if any((getattr(response, 'streaming', False),
> > +                'gzip' in content_encoding,
> > +                content_type not in _HTML_TYPES)):
> > +            return response
> > +
> > +        # Insert the js-logger in the response.
> > +        content = force_text(
> > +            response.content, encoding=settings.DEFAULT_CHARSET)
> > +
> > +        pattern = re.escape(INSERT_BEFORE)
> > +        bits = re.split(pattern, content, flags=re.IGNORECASE)
> > +
> > +        if len(bits) > 1:
> > +            bits[-2] += _SCRIPT_TAG % reverse('js-error-handler-js')
>
> Isn't this replacing part of the code with the script tag?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/jojax/django-js-error-hook/pull/5/files#r11764764>
> .
>