src/Babble.php
private function injectLiveReload(Response $response)
    {
        $content = $response->getContent();
        $content = str_replace('</body>', '
            <script>
                document.write(\'<script src="http://\' + (location.host || \'localhost\').split(\':\')[0] + \':35729/livereload.js?snipver=1"></\' + \'script>\')
            </script></body>', $content);
        $response->setContent($content);
    }
private function injectLiveReload(Response $response)
    {
        $content = $response->getContent();
        $content = str_replace('</body>', '
            <script>
                document.write(\'<script src="http://\' + (location.host || \'localhost\').split(\':\')[0] + \':35729/livereload.js?snipver=1"></\' + \'script>\')
            </script></body>', $content);
        $response->setContent($content);
    }
private function injectLiveReload ( Response $ response ) { $ content = $ response -> getContent ( ) ; $ content = str_replace ( '</body>' , '
            <script>
                document.write(\'<script src="http://\' + (location.host || \'localhost\').split(\':\')[0] + \':35729/livereload.js?snipver=1"></\' + \'script>\')
            </script></body>' , $ content ) ; $ response -> setContent ( $ content ) ; }
Injects script tag that loads livereload.js to the response.

@param Response $response
Injects script tag that loads livereload . js to the response .