Skip to content

Instantly share code, notes, and snippets.

@ivanatpr
Forked from noelleleigh/multiRedditExportCopyPaste
Last active March 16, 2016 00:53
Show Gist options
  • Save ivanatpr/e142f6504baa537027d5 to your computer and use it in GitHub Desktop.
Save ivanatpr/e142f6504baa537027d5 to your computer and use it in GitHub Desktop.
Bookmerklet that converts a multi-reddit into an equivalent URL using the old syntax (e.g. reddit.com/r/funny+politics+gaming). Trivial change from original to produce a full reddit url, so result now includes the initial "http://reddit.com/r/"
javascript: (function() {
var ul_array = document.getElementsByClassName('subreddits').item(0).children;
var multiString = "http://reddit.com/r/";
for (var i = 0; i < ul_array.length; i++) {
var subName = ul_array[i].firstChild.firstChild.data.slice(3);
multiString += subName + "+"
}
window.prompt('Copy this string and send it to your phone. \n\nIn Alien Blue: \n\nTap "Edit" \nTap the "+" button next to the group you want the multi to be in. \nPaste the string into the "/r/" box. \nTap "Done"', multiString);
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment