Sha256: 47391b6be16b0d8da254da4d32889caac824955b2851ab241d51483fb2003336
Contents?: true
Size: 597 Bytes
Versions: 1
Compression:
Stored size: 597 Bytes
Contents
<h1>Live Stream</h1> <table id="stream"></table> <script> function load(element, path) { var request = new XMLHttpRequest(); request.open("GET", path, true); request.onload = function() { if (request.status >= 200 && request.status < 400) { var resp = request.responseText; element.innerHTML = resp; } }; request.send(); } function fetchRecentSearches() { load(document.getElementById("stream"), <%= raw json_escape(searches_recent_path.to_json) %>) setTimeout(fetchRecentSearches, 5 * 1000); } fetchRecentSearches(); </script>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
searchjoy-1.0.0 | app/views/searchjoy/searches/stream.html.erb |