Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 25 lines (18 sloc) 673 Bytes
#!/usr/bin/env python
# Take a LinkedIn URL in the PRIMARY selection,
# remove any newlines, fix the errors LinkedIn makes (entity substitution)
# and add infinite pagination.
# Then call Firefox on the fixed URL.
import sys
import subprocess
import gtk
primary = gtk.clipboard_get(gtk.gdk.SELECTION_PRIMARY)
if not primary.wait_is_text_available() :
link = primary.wait_for_text()
link = link.replace("\n", "").replace("&", "&") + \
if len(sys.argv) > 1 and (sys.argv[1] == '-s' or sys.argv[1] == '--same-tab'):["firefox", link])
else:["firefox", "-new-tab", link])