Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

107 lines (98 sloc) 3.708 kb
%meta(http-equiv="Content-Type" content="text/html; charset=utf-8")
%title Twitter → Pinboard username mapper
/[if lt IE 9]
function checkIfUsernameExists(username, id) {
url: '/pingboard.json',
data: { username: username, id: id },
success: function(data) {
if (data.status == "NO") {
$("#friend-""? <span>(name not on Pinboard)</span>");
} else {
var encoded_username = $("<div/>").text(username).html();
$("#friend-"'maybe <a href="'+encoded_username+'">'+encoded_username+'</a> <span>(unverified, in use)</span>');
font-family: sans-serif
> div
width: 43%
margin-right: 4%
padding: 0 1%
float: left
span span
color: #AAA
clear: both
padding-top: 20px
%h1 Twitter &rarr; Pinboard username mapper
%h2 Add your usernames for others to find
%form{ :method => 'post', :action => '' }
%label{ :for => "twitter" } Your Twitter username:
%input{ :type => "text", :name => "twitter" }
%label{ :for => "pinboard" } Your Pinboard username:
%input{ :type => "text", :name => "pinboard" }
(can leave empty if identical)
%button Add
%h2 Recently added
- if @mappings.empty?
%p None yet.
- else
- @mappings.each do |mapping|
%a{ :href => "{h mapping.twitter}"}=h mapping.twitter
%a{ :href => "{h mapping.pinboard}"}=h mapping.pinboard
%h2 Find your Twitter network on Pinboard
%form{ :method => 'get' }
%label{ :for => "name" } Your Twitter username:
%input{ :type => "text", :name => "name", :value => params[:name] }
%button Search
- if @friends
%h2 Network of #{h @name}
- if @friends.empty?
%p No friends, sorry!
- else
- @friends.each_with_index do |friend, index|
- mapping = Mapping[:twitter => friend.downcase]
%a{ :href => "{h friend}"}=h friend
%span{ :id => "friend-#{index}" }
- if mapping && (pinboard = mapping.pinboard)
%a{ :href => "{h pinboard}"}=h pinboard
- else
Unknown, but try
%a{ :href => "{h friend}"}=h friend
$(function() {
checkIfUsernameExists(#{friend.to_json}, #{index});
<a href="/export.json">Export all mappings as JSON</a> (<a href="/export.json?different=true">only when usernames differ</a>).
By <a href="">Simon Jefford</a>
(based on <a href="htttp://">Delpin</a>
by <a href="">Henrik Nyh</a>)
<a href="">View source on GitHub</a>.
Jump to Line
Something went wrong with that request. Please try again.