Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Enable access to ?hash param #6

Open
vinliao opened this issue Jul 27, 2022 · 1 comment
Open

Enable access to ?hash param #6

vinliao opened this issue Jul 27, 2022 · 1 comment

Comments

@vinliao
Copy link

vinliao commented Jul 27, 2022

I found a helpful Discord post by Mark Knol:

Screenshot from 2022-07-27 11-52-17

Perhaps the code in the first paragraph should be the default. (It's already the default in the Webpack boilerplate...)

It involves a small change:
var fxhash = "oo" + Array(49).fill(0).map(_ => alphabet[(Math.random() * alphabet.length) | 0]).join('');

to

var fxhash = new URLSearchParams(window.location.search).get("hash") ?? "oo" + Array(49).fill(0).map(_ => alphabet[(Math.random() * alphabet.length) | 0]).join('')

And that'll enable things like http://localhost:8080/?hash=oo8NXj8zdYBzETAyPLRj2RxaEqMJHbZf9TLqaCXiFpRyyuHbyq1.

@vinliao vinliao changed the title Enable acces to ?hash param Enable access to ?hash param Jul 27, 2022
@iuriguilherme
Copy link

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants