two-factor icon indicating copy to clipboard operation
two-factor copied to clipboard

Move inline JS to external scripts

Open dd32 opened this issue 2 years ago • 1 comments

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 avatar May 02 '23 06:05 dd32

@dd32 is there more work expected on this or can this move out of draft for review on path towards merge?

jeffpaul avatar Sep 17 '24 22:09 jeffpaul