Skip to content

Commit

Permalink
Move the debug item generator to a safer spot
Browse files Browse the repository at this point in the history
  • Loading branch information
FMaz008 committed Mar 12, 2024
1 parent 9ec4cb2 commit 400d455
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions scripts/bootloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -802,23 +802,6 @@ window.addEventListener("message", async function (event) {

//Key bindings/keyboard shortcuts for navigation
window.addEventListener("keydown", async function (e) {
//Debug: secret keybind to generate dummy hidden items
/*if (e.key == "g") {
if (
this.confirm(
"Generate 10,000 dummy items in local storage? (Will take ~1min)"
)
) {
for (i = 0; i < 10000; i++) {
fakeAsin = generateString(10);
HiddenList.addItem(fakeAsin, false);
}
HiddenList.saveList();
this.alert("10000 items generated");
}
}
*/

//Do not run the extension if ultraviner is running
if (ultraviner) {
return;
Expand All @@ -838,6 +821,23 @@ window.addEventListener("keydown", async function (e) {
return false;
}

//Debug: secret keybind to generate dummy hidden items
/*if (e.key == "g") {
if (
this.confirm(
"Generate 10,000 dummy items in local storage? (Will take ~1min)"
)
) {
for (i = 0; i < 10000; i++) {
fakeAsin = generateString(10);
HiddenList.addItem(fakeAsin, false);
}
HiddenList.saveList();
this.alert("10000 items generated");
}
}
*/

if (appSettings.hiddenTab.active) {
if (e.key == appSettings.keyBindings.hideAll) hideAllItems();
if (e.key == appSettings.keyBindings.showAll) showAllItems();
Expand Down

0 comments on commit 400d455

Please sign in to comment.