diff options
author | bep <bjorn.erik.pedersen@gmail.com> | 2015-05-12 19:49:44 +0200 |
---|---|---|
committer | bep <bjorn.erik.pedersen@gmail.com> | 2015-05-12 19:49:46 +0200 |
commit | be1287fba05fb87e80aaf3c277dd7c74408375e2 (patch) | |
tree | 1a90e8902084e25f5ebda6aa1c54493a2704f3ec | |
parent | be5fa2f3bd54b1d79cf078bb9c1d0af6e7715b26 (diff) |
Add data-no-instant to livereload script tag
To support instantclick.
Fixes #1135
-rw-r--r-- | transform/livereloadinject.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/transform/livereloadinject.go b/transform/livereloadinject.go index e5c100960..38e4e8cc9 100644 --- a/transform/livereloadinject.go +++ b/transform/livereloadinject.go @@ -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>`) |