Lister les nouveautés de GitLab-CE
{
const wishesSections = ['top-feature', 'primary-features', 'secondary-features'];
const availableData = '[data-original-title="Available in GitLab self-managed Free"]'
const [topFeatures, primaryFeatures, secondaryFeatures] = Array.from(document.querySelectorAll('.content > section')).filter(el => wishesSections.includes(el.id));
const nestedElement = (el, overload) => {
const paths = overload.split(".");
let result = el.parentNode.parentNode.parentNode;
for (path of paths) {
result = result[path];
}
return result;
};
const primaryAvailable = Array.from(primaryFeatures.querySelectorAll(availableData)).map(el => nestedElement(el, 'parentNode.parentNode.previousElementSibling.firstElementChild.lastElementChild.textContent'));
// console.log(primaryAvailable);
const secondaryAvailable = Array.from(secondaryFeatures.querySelectorAll(availableData)).map(el => nestedElement(el, 'previousElementSibling.lastElementChild.textContent'));
// console.log(secondaryAvailable);
console.log([].concat(primaryAvailable,secondaryAvailable).join('\n'));
}