public
Last active

  • Download Gist
waldo.html.erb
HTML+ERB
1 2 3 4 5 6 7 8 9 10 11 12 13 14
<% if logged_in? -%>
<script type="text/javascript">
function wheresWaldo(users) {
document.write("<p>Users on this page: ")
var links = []
users.forEach(function(user) {
var pieces = user.split('/')
links.push('<a href="/users/' + pieces[0] + '">' + pieces[1] + '</a>')
})
document.write(links.join(", ") + "</p>")
}
</script>
<script type="text/javascript" src="http://localhost:3456/track_and_list?callback=wheresWaldo&amp;name=<%= URI.escape("#{current_user.id}/#{current_user.name.split(" ").first}") %>&amp;location=<%= URI.escape(request.request_uri) %>"></script>
<% end -%>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.