Skip to content

Instantly share code, notes, and snippets.

@alekstrust
Created December 12, 2017 22:08
Show Gist options
  • Save alekstrust/012944c5dc067e39b47d8417b27f8316 to your computer and use it in GitHub Desktop.
Save alekstrust/012944c5dc067e39b47d8417b27f8316 to your computer and use it in GitHub Desktop.
Select DSpace collection handles from Community list using browser
$('#ds-body > ul > li.ds-artifact-item.community.odd > ul').find('.collection a').each(function(i,e){
var tokens = $(this).text().split('- ');
var coltype = tokens[tokens.length - 1].trim();
console.log('<name-map collection-handle="' + $(this).attr('href') + '" form-name="' + coltype + '" />');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment