Created
August 28, 2012 19:41
-
-
Save crismanNoble/3503243 to your computer and use it in GitHub Desktop.
Importing Chrome Bookmarks to Kippt
This file contains hidden or 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
//Export Chrome bookmarks as html | |
//Manually add a id="target" to the <d1> under the <h3> of the folder you want to import | |
//Initialize your list | |
var list = ''; | |
//save the children of your target | |
var target = document.getElementById('target').children; | |
//grab all the titles and links, format them for easy importation to Kippt API | |
//start at 1 because the first child is an empty <p> | |
for (var i = 1; i < target.length; i++) { list = list + "{\"title\": \""+document.getElementById('target').children[i].children[0].innerHTML + '\", \"url\": \"' + document.getElementById('target').children[i].children[0].href + '\"}, ';} | |
return list; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks mate :)