Created
January 18, 2010 00:27
-
-
Save technoweenie/279689 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% 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&name=<%= URI.escape("#{current_user.id}/#{current_user.name.split(" ").first}") %>&location=<%= URI.escape(request.request_uri) %>"></script> | |
<% end -%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment