Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Javascript In Preparation for Multiple Wordlists #46

Closed
dmuth opened this issue May 7, 2023 · 0 comments
Closed

Refactor Javascript In Preparation for Multiple Wordlists #46

dmuth opened this issue May 7, 2023 · 0 comments
Assignees

Comments

@dmuth
Copy link
Owner

dmuth commented May 7, 2023

There's been some talk about multiple word lists, and as part of the effort for this, I think I'm going to need to do a refactor of Javascript, as src/index.js is currently at 500 lines. So here's the stuff I want to get done in this branch:

  • Split up Diceware.go() into smaller functions
  • Put display_row() and rollDiceHandler*() functions into a separate file
  • Loading file code
    • I want to change this or it's just an AJAX/XHR load request
    • ...and the file should be a plain file
  • Upload Roll Dice! button to display that the wordlist is being loaded. This should prevent conditions where people click the button before the wordlist is loaded.
  • Add <NOSCRIPT> tags for the benefit of people using Tor or a similarly locked down browser

At the conclusion of this bug, I should be in a much better state to be able to start loading additional wordlists, if so desired. I'm specifically keeping #45 and #39 in mind here.

NOTE: One thing that hampers me is that I I don't do much front-end development professionally, so my knowledge of the Javascript ecosystem (like, webpack and friends) has stagnated. Any guidance for structuring my code better is certainly welcome. :-)

-- Doug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant