Skip to content

Refactor Javascript In Preparation for Multiple Wordlists #46

Description

@dmuth

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions