Skip to content

Instantly share code, notes, and snippets.

@davidlukac
Last active August 29, 2015 14:19
Show Gist options
  • Save davidlukac/b92be6d9d9511544f596 to your computer and use it in GitHub Desktop.
Save davidlukac/b92be6d9d9511544f596 to your computer and use it in GitHub Desktop.
Parse enabled modules from modules pages (Drupal 7.x; /admin/modules)
var module = '';
jQuery.each(jQuery('#system-modules tr'), function(index, value) {
if (jQuery( this).find('.form-checkbox').val() == 1) {
module = module + '\n' + jQuery(this).find('strong').text() + ',' + jQuery( this).find('td:nth-child(3)').text();
}
});
console.log(module);
var module = '';
jQuery.each(jQuery('#system-modules tr'), function(index, value) {
if ((jQuery(this).find('input:checked').val() == 1)) {
module = module + '\n' + jQuery(this).find('strong').text() + ',' + jQuery( this).find('td:nth-child(3)').text();
}
});
console.log(module);
var module = '';
jQuery.each(jQuery('#update-manager-update-form tr'), function( index, value ) {
if (jQuery(this).find('.form-type-checkbox').val() == 0) {
module = module + '\n' + "\"" + jQuery(this).find("td:nth-child(2) a").text() + "\": " + jQuery( this).find("td:nth-child(3)").text() + " -> " + jQuery(this).find("td:nth-child(4)").text().split(" (Release notes)").slice(0, 1);
}
});
console.log(module);
@davidlukac
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment