From 8933f057c905a3693f5446df3ac5f524a9ffa936 Mon Sep 17 00:00:00 2001 From: Larry Xue Date: Wed, 18 Oct 2023 12:09:01 -0400 Subject: [PATCH] remove unnecessary query params --- src/scripts/consts.js | 8 ++++++++ src/scripts/dropdowns.js | 4 ++-- src/scripts/filters.js | 13 ------------- src/scripts/index.js | 17 +++++++---------- src/scripts/params.js | 21 +++++++++++++++++++++ 5 files changed, 38 insertions(+), 25 deletions(-) create mode 100644 src/scripts/params.js diff --git a/src/scripts/consts.js b/src/scripts/consts.js index 7884751..fd12b68 100644 --- a/src/scripts/consts.js +++ b/src/scripts/consts.js @@ -22,3 +22,11 @@ export const SORT_FIELDS = [ "Total Downloads", ].map((v, i) => [v, i + 1]); export const SORT_ORDERS = ["asc", "desc"].map((v) => [v, v]); + +export const DEFAULT_PARAMS = { + classId: "6", // "Mods" + modLoaderType: "0", // "Any" + sortField: "6", // "Total Downloads" + sortOrder: "desc", + pageSize: "50", +}; diff --git a/src/scripts/dropdowns.js b/src/scripts/dropdowns.js index 9192ad5..d2a7ad6 100644 --- a/src/scripts/dropdowns.js +++ b/src/scripts/dropdowns.js @@ -27,9 +27,9 @@ export function populate_dropdown(dropdown, values, defaultValue) { dropdown.prepend(defaultOption); } else { // otherwise, select the corresponding