two-factor
two-factor copied to clipboard
Move inline JS to external scripts
See #558 (That's fixed, but this is a more generic 'use the dependency system' PR)
What?
This migrates all inline JS from being inline and using jQuery to using Vanilla JS and external .js files.
This is not perfect JS, I'm no expert.
I've used dataset to pass the userId through, this should likely be replaced with a global JS object instead that contains it and the two-factor rest-api namespace.
Why?
Other than getting proper dependency loading as per #558, there's benefits in the code maintainability by splitting the HTML from the JS.
How?
Testing Instructions
Screenshots or screencast
Changelog Entry
Added - New feature. Changed - Existing functionality. Deprecated - Soon-to-be removed feature. Removed - Feature. Fixed - Bug fix. Security - Vulnerability.
@dd32 is there more work expected on this or can this move out of draft for review on path towards merge?