Created
May 14, 2024 10:38
-
-
Save 50l3r/a21565840bc0d58e4427b390d163b121 to your computer and use it in GitHub Desktop.
Export only whitelisted tables on PHPMyAdmin
This file contains 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
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