o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1358393079.807449: @value"Ï{I" class:EFI"ProcessedAsset;FI"logical_path;FI"'rails_assistant/rails_assistant.js;FI" pathname;FI"u/Users/daniel/Projects/Nocturnal/GitHub/RailsAssistant/app/assets/javascripts/rails_assistant/rails_assistant.js;FI"content_type;FI"application/javascript;FI" mtime;FI"2013-01-17T16:24:37+13:00;FI" length;Fi¼ I" digest;F"%c864cda3c7e38e6ac461800fb9447366I" source;FI"¼ // This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. // // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // the compiled file. // // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD // GO AFTER THE REQUIRES BELOW. // function WebSocketTest() { if ("WebSocket" in window) { alert("WebSocket supported here! :)\r\n\r\nBrowser: " + navigator.appName + " " + navigator.appVersion + "\r\n\r\n(based on Google sample code)"); } else { // Browser doesn't support WebSocket alert("WebSocket NOT supported here! :(\r\n\r\nBrowser: " + navigator.appName + " " + navigator.appVersion + "\r\n\r\n(based on Google sample code)"); } } var ws; var t; function init() { document.getElementById('updateme').innerHTML = "connecting to websocket"; OpenWebSocket(); } function OpenWebSocket() { if ("WebSocket" in window) { ws = new WebSocket("%%WEBSOCKET_URL%%"); ws.onopen = function() { // Web Socket is connected document.getElementById('updateme').innerHTML = "websocket is open"; t=setTimeout("SendMessage()",1000); }; ws.onmessage = function(evt) { document.getElementById('updateme').innerHTML = evt.data; }; ws.onclose = function() { document.getElementById('updateme').innerHTML = "websocket is closed"; OpenWebSocket(); }; ws.onerror = function(evt) { alert("onerror: " + evt); }; } else { alert("Browser doesn't support WebSocket!"); } } function SendMessage() { if ("WebSocket" in window) { ws.send("time"); t=setTimeout("SendMessage()",1000); } else { alert("Browser doesn't support WebSocket!"); } } $(window).load(function() { if ("WebSocket" in window) { $('body').append('
') ws = new WebSocket("ws://localhost:12345/service"); ws.onopen = function() { // Web Socket is connected document.getElementById('updateme').innerHTML = "websocket is open"; t=setTimeout("SendMessage()",1000); }; ws.onmessage = function(evt) { var message = evt.data; if (message == "reload") { window.location.reload(true); } else { document.getElementById('updateme').innerHTML = message; } }; ws.onclose = function() { //document.getElementById('updateme').innerHTML = "websocket is closed"; OpenWebSocket(); }; ws.onerror = function(evt) { alert("onerror: " + evt); }; } else { alert("Browser doesn't support WebSocket!"); } }); ;FI"dependency_digest;F"%be6e90b75de0775722bb3b34dbc74b3dI"required_paths;F[I"w/Users/daniel/.rvm/gems/ruby-1.9.3-p194@RailsAssistant/gems/jquery-rails-2.1.4/vendor/assets/javascripts/jquery.js;FI"{/Users/daniel/.rvm/gems/ruby-1.9.3-p194@RailsAssistant/gems/jquery-rails-2.1.4/vendor/assets/javascripts/jquery_ujs.js;FI"u/Users/daniel/Projects/Nocturnal/GitHub/RailsAssistant/app/assets/javascripts/rails_assistant/rails_assistant.js;FI"dependency_paths;F[ {I" path;FI"b/Users/daniel/Projects/Nocturnal/GitHub/RailsAssistant/app/assets/javascripts/rails_assistant;FI" mtime;FI"2013-01-17T16:12:33+13:00;FI" digest;F"%04491444a398b1832bccccfec0f4eb46{I" path;FI"u/Users/daniel/Projects/Nocturnal/GitHub/RailsAssistant/app/assets/javascripts/rails_assistant/rails_assistant.js;FI" mtime;FI"2013-01-17T16:24:37+13:00;FI" digest;F"%06c50c42ec5aaee5ff19dd3ac0a0156a{I" path;FI"w/Users/daniel/.rvm/gems/ruby-1.9.3-p194@RailsAssistant/gems/jquery-rails-2.1.4/vendor/assets/javascripts/jquery.js;FI" mtime;FI"2013-01-15T23:04:30+13:00;FI" digest;F"%f2ce65e415fd2052859d295e2408c12f{I" path;FI"{/Users/daniel/.rvm/gems/ruby-1.9.3-p194@RailsAssistant/gems/jquery-rails-2.1.4/vendor/assets/javascripts/jquery_ujs.js;FI" mtime;FI"2013-01-15T23:04:30+13:00;FI" digest;F"%dbffce0516bb6cebd4daed20bf58d5baI" _version;F"%6776f581a4329e299531e1d52aa59832