Skip to content

Instantly share code, notes, and snippets.

@ebenolson
Created November 30, 2018 16:26
Show Gist options
  • Save ebenolson/75fe6435b123a4d29aaf42c864d36449 to your computer and use it in GitHub Desktop.
Save ebenolson/75fe6435b123a4d29aaf42c864d36449 to your computer and use it in GitHub Desktop.
Export MPN from Mouser order page
javascript:(function(){
function copyStringToClipboard (str) {
var el = document.createElement('textarea');
el.value = str;
el.setAttribute('readonly', '');
el.style = {position: 'absolute', left: '-9999px'};
document.body.appendChild(el);
el.select();
document.execCommand('copy');
document.body.removeChild(el);
};a = $("a[id*='ManufacturerPartNumber']").map(function(index) { return $(this).text()}).toArray();copyStringToClipboard(a.join('\n'));})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment