Skip to content
/ hugo Public
forked from gohugoio/hugo

Commit

Permalink
livereload: Update livereload.js to v4.0.2
Browse files Browse the repository at this point in the history
We no longer need a patched version because livereload/livereload-js#84
was merged on 28 Dec 2019.

Closes gohugoio#6290
  • Loading branch information
jmooring committed May 1, 2024
1 parent c8e400b commit 879221b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions livereload/livereload.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ func liveReloadJS() []byte {
}

var (
// This is a patched version, see https://github.com/livereload/livereload-js/pull/84
//go:embed livereload.js
livereloadJS string
hugoLiveReloadPlugin = fmt.Sprintf(`
Expand All @@ -168,11 +167,11 @@ HugoReload.prototype.reload = function(path, options) {
if (path.lastIndexOf(prefix, 0) !== 0) {
return false
}
path = path.substring(prefix.length);
var portChanged = options.overrideURL && options.overrideURL != window.location.port
if (!portChanged && window.location.pathname === path) {
window.location.reload();
} else {
Expand Down
Loading

0 comments on commit 879221b

Please sign in to comment.