use location.protocol to inject the livereload script instead of forcing http (#8718)

Merge pull request 8718
This commit is contained in:
Aram Akhavan 2021-07-23 07:42:15 -07:00 committed by GitHub
parent 0ce9a7c179
commit 9bb98edb29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ module Jekyll
@template ||= ERB.new(<<~TEMPLATE)
<script>
document.write(
'<script src="http://' +
'<script src="' + location.protocol + '//' +
(location.host || 'localhost').split(':')[0] +
':<%=@options["livereload_port"] %>/livereload.js?snipver=1<%= livereload_args %>"' +
'></' +