Skip to content

Instantly share code, notes, and snippets.

@dzoladz
Created May 10, 2022 00:49
Show Gist options
  • Save dzoladz/3ab9b2d389271a083b610d886a08cee6 to your computer and use it in GitHub Desktop.
Save dzoladz/3ab9b2d389271a083b610d886a08cee6 to your computer and use it in GitHub Desktop.
JS Fix for Duplicate 856 $9 in Evergreen E-Resource Bibs in Consortial View
(function() {
// index 0 contain the h2 element
const div = document.getElementsByClassName('rdetail_uris')[1];
// create a collection of the li elements
const targets = div.getElementsByTagName('li');
// loop to append css for UI cleanup
let i = 1; // we want to retain the first element
let len = targets.length;
for (; i < len; ) {
targets[i].style.cssText += 'display: none;';
i++;
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment