From b395b7837ab483c73e2a79f97e2686c815797b99 Mon Sep 17 00:00:00 2001 From: Eric Cornelissen Date: Wed, 1 Nov 2017 21:17:23 +0100 Subject: [PATCH 1/2] Add support for search query in URL As discussed in #648, implemented JavaScript based support for a search query in the URL. This feature does two things: 1. If you go to `www.simpleicons.org/?q=adobe`, the page will load with a search query for the string `'adobe'`. 2. If you start searching on `www.simpleicons.org`, the url will be updated with each keystroke to `www.simpleicons.org/?q=hellowor`. Since `window.history.replaceState` is being used, this changing of the URL does not mess with the browser history. I.e. if the user came from www.google.com, started searching and press the back button they will return to www.google.com immediately. --- index.html | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 018098bdf..5db7a7a4d 100644 --- a/index.html +++ b/index.html @@ -536,12 +536,13 @@ {% endfor %}