Skip to content

Instantly share code, notes, and snippets.

@magnum
Created March 1, 2023 17:21
Show Gist options
  • Save magnum/79eec4e18bb9feeb1458912f869f8f3e to your computer and use it in GitHub Desktop.
Save magnum/79eec4e18bb9feeb1458912f869f8f3e to your computer and use it in GitHub Desktop.
list drupal7 modules
(function($){
const data = [];
$("fieldset").each(function(i,elCategory){
const category = $(elCategory).find('.fieldset-title').text().replace("Nascondi ", "");
$(elCategory).find("tr").each(function(i,elModule){
const title = $(elModule).find("strong").text();
const active = $(elModule).find("input[type='checkbox']:checked");
data.push({
category: category,
title: title,
active: active
});
})
});
console.table(data)
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment