public function inject(Response &$response)
    {
        $renderer = $this->debugBar->getJavascriptRenderer('/__debug__/');

        if (stripos($response->headers->get('Content-Type'), 'text/html') === 0) {
            $content = $response->getContent();
            $content = self::injectHtml($content, $renderer->renderHead(), '</head>');
            $content = self::injectHtml($content, $renderer->render(), '</body>');
            $response->setContent($content);
        }
    }