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

Remove jQuery dependency in login page #2

Open
GBirkel opened this issue Oct 22, 2024 · 0 comments
Open

Remove jQuery dependency in login page #2

GBirkel opened this issue Oct 22, 2024 · 0 comments
Assignees

Comments

@GBirkel
Copy link

GBirkel commented Oct 22, 2024

<script src="https://code.jquery.com/jquery-2.2.4.js"></script>

A minor optimization, but it reduces the number of moving parts.

There is no jQuery, or even Javascript, needed for this operation. The Python code that uses this string ( https://github.com/als-computing/splash_auth/blob/207d6430bb30bc61f4c4c03c7e9b539fe93993a7/splash_auth/main.py#L88C12-L88C21 ) is using .format to swap in variables, so we can just swap them directly into the href of the element in the document, rather than attaching an href to it using jQuery's "ready" event. ... which I assume we are only using in order to wait for jQuery to load (Catch-22!).

@GBirkel GBirkel self-assigned this Oct 22, 2024
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