projects
/
brevno-suite
/
hugo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be5fa2f
)
Add data-no-instant to livereload script tag
author
bep
<bjorn.erik.pedersen@gmail.com>
Tue, 12 May 2015 17:49:44 +0000
(19:49 +0200)
committer
bep
<bjorn.erik.pedersen@gmail.com>
Tue, 12 May 2015 17:49:46 +0000
(19:49 +0200)
To support instantclick.
Fixes #1135
transform/livereloadinject.go
patch
|
blob
|
history
diff --git
a/transform/livereloadinject.go
b/transform/livereloadinject.go
index e5c1009605926592033141e8e92f24e38030389a..38e4e8cc96df3f78b05b8a931a518352930a3f52 100644
(file)
--- 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>`)