From c189bc9741b50daeb74949ad034c9a3fc1907c24 Mon Sep 17 00:00:00 2001 From: Pro4TLZZ <22709115+pro4tlzz@users.noreply.github.com> Date: Tue, 13 Jun 2023 17:57:01 +0100 Subject: [PATCH] Add Toggle all user attributes to export users --- rockstar/rockstar.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/rockstar/rockstar.js b/rockstar/rockstar.js index ea07803..3f57844 100644 --- a/rockstar/rockstar.js +++ b/rockstar/rockstar.js @@ -606,7 +606,7 @@ function addCheckbox(value, text) { const checked = exportColumns.includes(value) ? "checked" : ""; - checkboxDiv.html(checkboxDiv.html() + `
`); + checkboxDiv.html(checkboxDiv.html() + `
`); } const user = { id: "User Id", @@ -668,7 +668,16 @@ for (const p in profile) addCheckbox("profile." + p, profile[p]); errorBox.html('Unable to fetch custom attributes. Use an account with more privileges.
Only base attributes shown below.'); }); - + selectAllAttributesButton = exportPopup.append(`
`); + $('#selectAllAttributes').on("click", function () { + if ($(this).val() == 'Toggle All' || $(this).val() == 'Check All') { + $('.userProfileAttributeCheckboxes').prop('checked', true); + $(this).val('Uncheck All'); + } else { + $('.userProfileAttributeCheckboxes').prop('checked', false); + $(this).val('Check All'); + } + }); if (filter) { var exportArgs = localStorage.rockstarExportUserArgs || ""; exportPopup.append(