Add data-no-instant to livereload script tag

To support instantclick.

Fixes #1135
This commit is contained in:
bep 2015-05-12 19:49:44 +02:00
parent be5fa2f3bd
commit be1287fba0

View file

@ -8,7 +8,7 @@ import (
func LiveReloadInject(ct contentTransformer) { func LiveReloadInject(ct contentTransformer) {
match := []byte("</body>") match := []byte("</body>")
port := viper.GetString("port") 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] + (location.host || 'localhost').split(':')[0]
+ ':` + port + `/livereload.js?mindelay=10"></' + ':` + port + `/livereload.js?mindelay=10"></'
+ 'script>')</script></body>`) + 'script>')</script></body>`)