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

Keep the URL updated with the input #169

Merged
merged 2 commits into from Sep 3, 2018
Merged

Keep the URL updated with the input #169

merged 2 commits into from Sep 3, 2018

Conversation

n4bb12
Copy link
Contributor

@n4bb12 n4bb12 commented Sep 2, 2018

Adds the most recent input to the URL.

Example Input:

7+8

Updates the URL to:

https://insect.sh/?q=7%2B8

Resolves #161

web/index.html Outdated
@@ -67,6 +67,9 @@
ga('send', 'event', 'user-input', 'success', line);
}

const url = "/?q=" + encodeURIComponent(line)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will const really work for all (possibly mildly outdated) browsers? I think I would prefer a simple var here, even if const would be cleaner from a theoretical point of view.

Also, could you please add semicolons (for consistency)?

@sharkdp
Copy link
Owner

sharkdp commented Sep 3, 2018

Thank you very much!

Copy link
Owner

@sharkdp sharkdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@sharkdp sharkdp merged commit 60f7e5f into sharkdp:master Sep 3, 2018
@n4bb12 n4bb12 deleted the accept-input-from-url branch September 3, 2018 17:24
@n4bb12 n4bb12 restored the accept-input-from-url branch September 3, 2018 20:10
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 this pull request may close these issues.

None yet

2 participants