Last active
December 18, 2015 16:49
-
-
Save sparr/5814191 to your computer and use it in GitHub Desktop.
Add profile links to Facebook friend list management
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
// run this with the "Edit [list]" dialog open | |
// it will add a Profile link above each user's photo | |
checkboxes = document.getElementsByName('checkableitems[]'); | |
for(var i=0, n=checkboxes.length;i<n;i++) { | |
var a = document.createElement('a'); | |
var linkText = document.createTextNode("Profile"); | |
a.appendChild(linkText); | |
a.href = "http://facebook.com/" + checkboxes[i].value; | |
a.target = "_blank"; | |
checkboxes[i].parentNode.insertBefore(a, checkboxes[i]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment