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

Unique, periodically refreshed hash #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

benmpl
Copy link

@benmpl benmpl commented Dec 15, 2024

Adds a unique hash that is refreshed every second, so certains browsers don't detect multiple separators with the same name as duplicates and remove them.

The typeof check is there because crypto.randomUUID() has only been standard/implemented for a couple years (and I wanted to be extra cautious), and as a placeholder in case a polyfill is ever to be used; so it will work exactly the same as before in case someone is using a really outdated browser.

Should address #12

Adds a unique hash that is refreshed every second, so certains browsers don't detect multiple separators with the same name as duplicates.

The typeof check is there because crypto.randomUUID() has only been standard for a couple years, and as a placeholder in case a polyfill is ever to be used
@skrysmanski
Copy link
Owner

This is a great idea and the changes look good. Let me do some tests and then I think this can be merged.

@skrysmanski skrysmanski self-assigned this Dec 17, 2024
@skrysmanski skrysmanski added the enhancement New feature or request label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants