Sha256: b1ebd68e07f52cd8722ffb4039738d1dd0426141f60e37bd5055395bb1cd065c
Contents?: true
Size: 574 Bytes
Versions: 5
Compression:
Stored size: 574 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"), "<%= searches_recent_path %>") setTimeout(fetchRecentSearches, 5 * 1000); } fetchRecentSearches(); </script>
Version data entries
5 entries across 5 versions & 1 rubygems