Skip to content

Instantly share code, notes, and snippets.

@TedHusted
Last active November 27, 2019 01:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TedHusted/b4981225284e9ee4fdad536b3fbdc027 to your computer and use it in GitHub Desktop.
Save TedHusted/b4981225284e9ee4fdad536b3fbdc027 to your computer and use it in GitHub Desktop.
Determines what new components are being added to the next version of a Salesforce force.com package. Launch this Chrome bookmark from the package manifest page and specify the major version being developed. (Developed by Jeff Hube.)
javascript:for(var added=[],rows=document.getElementsByClassName("dataRow"),i=0;i<rows.length;i++){var cells=(row=rows[i]).getElementsByTagName("td"),version=cells[6].innerText.trim();if(""==version){var name=cells[2].innerText,parent=cells[3].innerText,type=cells[4].innerText;added.push({name:name,parent:parent,type:type})}}added.sort(function(e,t){return e.type!=t.type?e.type>t.type?1:-1:e.parent!=t.parent?e.parent>t.parent?1:-1:e.name>t.name?1:-1});var table=document.createElement("table"),lastType=null;for(i=0;i<added.length;i++){var item=added[i];if(item.type!=lastType){var row=document.createElement("tr"),cell=document.createElement("td"),header=document.createElement("h3");header.innerText=item.type,cell.appendChild(header),cell.setAttribute("colspan",2),row.appendChild(cell),table.appendChild(row)}lastType=item.type;row=document.createElement("tr");var cell1=document.createElement("td");cell1.innerText=item.parent,row.appendChild(cell1);var cell2=document.createElement("td");cell2.innerText=item.name,row.appendChild(cell2),table.appendChild(row)}var style=document.createElement("style");style.setAttribute("type","text/css"),style.innerHTML="td{padding:0px 10px}h3{margin-bottom:0px}";var body=document.createElement("body");for(body.appendChild(style),body.appendChild(table);document.hasChildNodes();)document.removeChild(document.lastChild);document.appendChild(body);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment