Created
July 27, 2016 19:12
-
-
Save cfg/acfbf0d37b51fbeee1b5d14906cec605 to your computer and use it in GitHub Desktop.
This file contains 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
// Browse to https://my.slack.com/team#active and open the developer console | |
x=[]; | |
jQuery('#active_members_list .team_list_item.member_item.active').each( function(ix, el) { | |
el = jQuery(el); | |
if( el.find('.member_image.bot').length ) { | |
return; // skip bots | |
} | |
var details = { | |
name: el.find('.member_name').text(), | |
tel: el.find('.member_data_table a[href^=tel]').text(), | |
skype: el.find('.member_data_table a[href^=skype]').text(), | |
email: el.find('.member_data_table a[href^=mailto]').text(), | |
timezone: el.find('.member_name_and_title span.mini').text() | |
}; | |
details.tel = details.tel.replace( /^\s*\(?(\d\d\d)\)?[\.\s\-]*(\d\d\d)[\.\s\-]*(\d\d\d\d)/, '($1) $2-$3'); | |
x.push( details ); | |
}) | |
copy( JSON.stringify(x) ); | |
console.log('paste clipboard into https://konklone.io/json/ or similar'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment