Skip to content

Instantly share code, notes, and snippets.

@50l3r
Created May 14, 2024 10:38
Show Gist options
  • Save 50l3r/a21565840bc0d58e4427b390d163b121 to your computer and use it in GitHub Desktop.
Save 50l3r/a21565840bc0d58e4427b390d163b121 to your computer and use it in GitHub Desktop.
Export only whitelisted tables on PHPMyAdmin
const wlist = ['table_name', 'table_name_2']
$('.export_table_select input').each(function () {
const self = $(this)
const type = self.attr('type')
const isCheckAll = self.hasClass('checkall')
if (type === 'checkbox' && !isCheckAll) {
const table = self.val()
const isWhitelist = wlist.includes(table)
if (!isWhitelist) {
self.prop('checked', false)
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment