[HN Gopher] Implementing Wordle in the Firefox address bar
       ___________________________________________________________________
        
       Implementing Wordle in the Firefox address bar
        
       Author : surprisetalk
       Score  : 195 points
       Date   : 2023-07-09 12:08 UTC (1 days ago)
        
 (HTM) web link (eieio.games)
 (TXT) w3m dump (eieio.games)
        
       | MH15 wrote:
       | Is the color scheme kinda odd for anyone else? Seems like the
       | focus is stuck on the video or something.
        
         | eieio wrote:
         | Hi! I picked the color scheme pretty haphazardly and have
         | avoided tweaking it because I figure I'll fall into a rabbit
         | hole. Do you just mean that the background seems super muted /
         | desaturated as though it's being faded while you play the
         | video? I could see how it might seem that way (the truth is
         | just that I'm not great at color picking :p).
        
       | reg_dunlop wrote:
       | Slate | Group | windy
        
       | pushedx wrote:
       | Does this suffer from the classic Wordle edge case bug of not
       | showing green and yellow for a duplicate letter in a wrong and
       | right position?
        
         | jeremieb wrote:
         | Looking at the source code, I think there's no such bug. The
         | `to_result` function first colors in green exact matches and
         | counts wrong position letters, then it colors in yellow theses
         | counted letters that are still uncolored.
         | https://github.com/nolenroyalty/wardle/blob/main/app.py#L45
        
         | [deleted]
        
       | IggleSniggle wrote:
       | This is super cool, and reminds me of when I first learned about
       | <summary><details> tags for some reason.
       | 
       | It also reminds me of this, which sadly loses some charm now that
       | browsers seem to love to hide the full URL:
       | 
       | https://matthewrayfield.com/articles/animating-urls-with-jav...
        
         | DrScientist wrote:
         | Cool - though I noticed it completely trashes your history with
         | loads of entries.
        
           | IggleSniggle wrote:
           | It's been a few years since I did frontend, but if I recall
           | correctly, it's possible to avoid trashing the history.
        
         | eieio wrote:
         | Author here! That article (and plenty of other stuff on that
         | site) was a direct inspiration for this trick! Matthew's stuff
         | is really great.
         | 
         | Early on I thought I might try to incorporate some kind of
         | browser-bar animation into what I was doing here but I didn't
         | come up with anything concrete before bumping into the browser-
         | compatibility issues that stopped me from going further with
         | this idea.
        
       | andrewfromx wrote:
       | Very impressive and a perfect article for HN.
        
         | PostOnce wrote:
         | We need more teeny-tiny projects that illustrate somewhat novel
         | or lesser-known "things you can do". I love it.
        
       | capitainenemo wrote:
       | SLATE
       | 
       | DIRTY
       | 
       | ROGUE
       | 
       | GREAT
       | 
       | GREET
       | 
       | WRT monospace (comment below the video), how about like this?
       | Also. Is there a playable version online somewhere?
        
         | eieio wrote:
         | Ah! That's a great idea re: monospace-ness.
         | 
         | I haven't put a playable version online just because I wasn't
         | super excited at spending much more time on something that is
         | Firefox-only just because that limits the audience a bit. I'm
         | toying with some other unusual vectors for games - I may end up
         | putting this game online when I've got a more complete set of
         | games to share.
         | 
         | If you're really curious it is not _too_ painful to run this
         | locally:                 * add `127.0.0.1 searchgame` to
         | /etc/hosts (or s/searchgame/127.0.0.1 in the wardle repo)
         | * clone https://github.com/nolenroyalty/wardle       * install
         | flask if applicable, then `flask --app app run`       * visit
         | http://searchgame/ in firefox       * right-click on the
         | address bar and click "add searchGame"       * now you can type
         | "searchg<TAB>" to start playing wordle
         | 
         | I don't mention it in the article but the fact that in Firefox
         | you have to right-click on the address bar was another bit of
         | friction that pushed me away from fleshing this idea out .
        
           | capitainenemo wrote:
           | Is it necessary to right click in the address bar? Like, if
           | I'm on en.wikipedia.org and I right click on the search bar
           | at the top of the page, I get a prompt to add the search with
           | a keyword, which appears to be using the opensearch spec.
           | 
           | Presumably that would make interacting with adding your toy
           | easier - you could tell the user to "right click here" with a
           | little popup. (well, actually I guess you could do that with
           | a little popup pointing at the address bar too - pretty sure
           | websites do that already for encouraging users to do actions
           | outside the browser window for adding a website as a phone
           | app for example)
           | 
           | But, yeah, unfortunate that opensearch isn't very
           | discoverable or cross-browser.. Still, it's just a toy
           | anyway, I assume you weren't planning to turn this into a
           | real service right? :) So who cares if it's Firefox only.
           | It's still a cool toy that would be neat to make real on a
           | random webpage somewhere.
        
             | eieio wrote:
             | Yeah you're totally right, right clicking a search bar
             | should also work and would be lower friction / less
             | confusing.
             | 
             | > Still, it's just a toy anyway, I assume you weren't
             | planning to turn this into a real service right? :)
             | 
             | Not a real service, but if it was more cross-browser I'd
             | probably have bought a domain for it and spent a week or
             | two trying to build more interesting games with the idea! I
             | think this would have been a fun constraint to build some
             | games around. But sure, this was never going to go far past
             | "fun art project / party trick"
        
               | capitainenemo wrote:
               | ah. gotcha. Shame about chrome, but yeah, not too
               | shocking that google does not have a ton of incentive to
               | encourage people using anything but google. heck, they've
               | done their best to turn the address bar into a google
               | search.
               | 
               | Still, you don't need to buy a whole domain right? you
               | could just toss the toy somewhere under an existing
               | domain. Use it to highlight google's opposition to
               | certain tech or something...
               | 
               | (oh, also to simplify things even more, your load page
               | could make the input the opensearch was tied to take up
               | the entire page so that people could right click anywhere
               | :) - or style it as an "install" button - "right click to
               | install")
        
               | eieio wrote:
               | That's also a great suggestion! I'll make sure to credit
               | you if I ever get this cleaned up and properly online :)
        
       ___________________________________________________________________
       (page generated 2023-07-10 23:01 UTC)