Skip to content

Commit

Permalink
only turn on livereload on non-standard port access
Browse files Browse the repository at this point in the history
fixes livereload from getting called in remote staging environment.
So example.com won't have livereload, but example.com:80 will.
  • Loading branch information
crccheck committed Nov 30, 2012
1 parent ba7fdcc commit 3bf6031
Showing 1 changed file with 6 additions and 1 deletion.
@@ -1,3 +1,8 @@
{% comment %}
This component is inserted into the HEAD only if debug is true.
{% endcomment %}
<script>
document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')
if (location.port) {
document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')
}
</script>

0 comments on commit 3bf6031

Please sign in to comment.