User:GreyHive/common.js

var spoilers = document.querySelectorAll('\*[id^="cite_ref"]');

// Add the spoiler class to the parent element of all citations spoilers.forEach(function (userItem) {   userItem.parentElement.classList.add("spoiler");  });