Skip to content

Instantly share code, notes, and snippets.

@zachariahtimothy
Created April 24, 2013 20:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zachariahtimothy/5455126 to your computer and use it in GitHub Desktop.
Save zachariahtimothy/5455126 to your computer and use it in GitHub Desktop.
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
Copy link

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