Last active
August 29, 2015 14:19
-
-
Save davidlukac/b92be6d9d9511544f596 to your computer and use it in GitHub Desktop.
Parse enabled modules from modules pages (Drupal 7.x; /admin/modules)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Kudos and written by @karolkasas (https://github.com/karolkasas).