Created
December 18, 2013 03:50
-
-
Save leesei/8017014 to your computer and use it in GitHub Desktop.
#js #snippet google-bookmark-to-json
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
| // first, visit google bookmark and jQuerify it | |
| // convert bookmarks in the current page to json | |
| // (paste to Chrome Dev Tools's Source -> Snippets, "Ctrl+Enter" to run) | |
| function entry2Json(entry) { | |
| return { | |
| title: entry.innerText, | |
| href: entry.href | |
| }; | |
| } | |
| bkmklist = $("a[id^='bkmk_href']") | |
| result = [].map.call(bkmklist, entry2Json, null, ' '); | |
| JSON.stringify(result, null, ' '); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment