Skip to content

Instantly share code, notes, and snippets.

View ivanatpr's full-sized avatar

Ivan G ivanatpr

View GitHub Profile
@ivanatpr
ivanatpr / multiRedditExportCopyPaste
Last active March 16, 2016 00:53 — forked from noelleleigh/multiRedditExportCopyPaste
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);
})()