206ce04e77
This allows the javascript to work with a non default value for the livereload port (specified with the port option in the guard command). For example, in config/environments/development.rb in rails: config.middleware.insert_after(ActionDispatch::Static, Rack::LiveReload, :live_reload_port => 22351) works with the following in the Guardfile: guard 'livereload', port: '22351' do ... end This allows multiple guard livereload processes to operate at the same time without conflicts.
14 lines
450 B
Plaintext
14 lines
450 B
Plaintext
<% if with_swf? %>
|
|
<script type="text/javascript">
|
|
WEB_SOCKET_SWF_LOCATION = "/__rack/WebSocketMain.swf";
|
|
<% if force_swf? %>
|
|
WEB_SOCKET_FORCE_FLASH = true;
|
|
<% end %>
|
|
RACK_LIVERELOAD_PORT = <%= @port %>;
|
|
</script>
|
|
<script type="text/javascript" src="/__rack/swfobject.js"></script>
|
|
<script type="text/javascript" src="/__rack/web_socket.js"></script>
|
|
<% end %>
|
|
<script type="text/javascript" src="<%= src %>"></script>
|
|
|