Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Code to export email addresses and forwarders from cPanel using Browser developer tools
// Email Addresses ///
var rows = $("#table_email_accts tr.dt_info_row"),
returnString = "";
rows.each(function(i, item){
var tdList = [];
$(item).find('td:eq(0)').each(function(s, subItem){
tdList.push($(subItem).text());
});
returnString += tdList + "\n";
});
console.log(returnString);
// Email Forwarders ///
var rows = $(“#mailtbl tbody tr”),
returnString = “”;
rows.each(function(i, item){
var tdList = [];
$(item).find(‘td.truncate’).each(function(s,subItem){
tdList.push($(subItem).text());
});
returnString += tdList + “\n”;
});
console.log(returnString);
niladam commented Mar 28, 2014

You saved me some time!:) Thanks!:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment