Add data-no-instant to livereload script tag
authorbep <bjorn.erik.pedersen@gmail.com>
Tue, 12 May 2015 17:49:44 +0000 (19:49 +0200)
committerbep <bjorn.erik.pedersen@gmail.com>
Tue, 12 May 2015 17:49:46 +0000 (19:49 +0200)
To support instantclick.

Fixes #1135

transform/livereloadinject.go

index e5c1009605926592033141e8e92f24e38030389a..38e4e8cc96df3f78b05b8a931a518352930a3f52 100644 (file)
@@ -8,7 +8,7 @@ import (
 func LiveReloadInject(ct contentTransformer) {
        match := []byte("</body>")
        port := viper.GetString("port")
-       replace := []byte(`<script>document.write('<script src="http://'
+       replace := []byte(`<script data-no-instant>document.write('<script src="http://'
         + (location.host || 'localhost').split(':')[0]
                + ':` + port + `/livereload.js?mindelay=10"></'
         + 'script>')</script></body>`)