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

Show warning in pre-rendered page. #51

Closed
akhilman opened this issue May 16, 2020 · 3 comments · Fixed by #52
Closed

Show warning in pre-rendered page. #51

akhilman opened this issue May 16, 2020 · 3 comments · Fixed by #52

Comments

@akhilman
Copy link
Member

If seed.org is open in a browser with JavaScript disabled or without WebAssembly support, then searching and switching the color scheme does not work quietly. We should display a warning that the browser does not support WebAssembly.

@MartinKavik
Copy link
Member

Feel free to send a PR.

@akhilman
Copy link
Member Author

akhilman commented May 16, 2020 via email

@MartinKavik
Copy link
Member

fn is_in_prerendering() -> bool {
let user_agent = window().navigator().user_agent().expect("get user agent");
user_agent == USER_AGENT_FOR_PRERENDERING
}

MartinKavik pushed a commit that referenced this issue Jun 5, 2020
Show a warning, disable the search, and disable the dark/light
mode switch for pre-processed pages, so as not to confuse users
with disabled scripts or browsers without support for web assembly.

Resolves #51
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

Successfully merging a pull request may close this issue.

2 participants