Skip to content

Instantly share code, notes, and snippets.

@vitaminmoo
Created November 18, 2015 05:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vitaminmoo/f57e604dad8e7e23a0c8 to your computer and use it in GitHub Desktop.
Save vitaminmoo/f57e604dad8e7e23a0c8 to your computer and use it in GitHub Desktop.
Slightly modified https://gist.github.com/sunahsuh/33fccd416a33bbdea466 - Bookmarklet to convert rdio favorites to csv. Songs will be in doublequotes. Use control-minus until all items are visible before clicking
javascript:(function() {
var bookmarklet = {
init: function() {
this.parse();
},
parse: function() {
page = "";
$(".GridItem:visible")
.children(".lower_content")
.children(".grid_description")
.each(function() {
line = [];
function buildLine() {
line.push($(this).text());
}
$(this).children(".track_title").children("grid_item_title").each(buildLine);
$(this).children(".single_line").children("a").each(buildLine);
page += line.join("\t") + "\r\n"; });
window.open("data:text/plain;charset=utf-8," + encodeURIComponent(page), "");
}
};
if (!window.jQuery) {
load();
} else {
bookmarklet.init();
} function load() {
var script = document.createElement("script");
script.src = "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
script.async = true;
script.type = "text/javascript";
script.onload = function() { bookmarklet.init(); };
document.body.appendChild(script);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment