cloudtube: Autofocus lower searchbar on homepage v1 SUPERSEDED

~lomanic: 1
 Autofocus lower searchbar on homepage

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~cadence/tube-devel/patches/21781/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH cloudtube] Autofocus lower searchbar on homepage Export this patch

From: Lomanic <lomanic@hotmail.fr>

As I use the [Privacy Redirect extension][1] to get redirected to
my instance, I find it quite practical to just type youtube in
the URL bar then Ctrl+Enter (www.youtube.com), to be redirected
to my instance homepage where I can just type my search right

[1]: https://github.com/SimonBrazell/privacy-redirect
 pug/home.pug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pug/home.pug b/pug/home.pug
index fa6814a..56a6fbc 100644
--- a/pug/home.pug
+++ b/pug/home.pug
@@ -11,7 +11,7 @@ block content
      p You're in control. Watch things your way.
      p Go on. What do you want to watch?
      form(method="get" action="/search").encouraging-search-form
        input(type="text" name="q" placeholder="I'd like to watch..." autocomplete="off").search.base-border-look
        input(type="text" name="q" placeholder="I'd like to watch..." autocomplete="off" autofocus).search.base-border-look
      p: a(href="/cant-think") ...can't think of anything?

I agree that this would be useful for computers, but some mobile devices, 
when there is an autofocus field, will also bring up the keyboard 
automatically, which I find disorientating.

Ideally I'd like it to autofocus for computers only, and I'm not sure how 
I'd do that.

Resolved in 8486517 using user-agent sniffing. Not perfect, but it
should cover the _vast_ majority of cases.