← Back to context

Comment by Titan2189

1 year ago

Who's gonna write an algorithm to turn every single flower into a [plant of choice]?

This worked on firefox

   const event = new Event("mousedown")

   const pArr = Array.from(document.querySelectorAll("p"))

   function switchSymbol(target) {
     target.dispatchEvent(event);
   }

   function switchUntil(target, until) {
     while (target.innerText !== until) {
       switchSymbol(target);
     }
   }

   for (const p of pArr) {
     switchUntil(p, "")
   }

Change the second argument of switchUntil to the emoji you want. HN doesn't allow emojis

Oh, I didn't realize you could click to cycle. Thought you had to move to an adjacent tile and back to cycle

It seems like not all columns are the same. For example I couldn't get an apple in the middle column

  • Col 15 has an apple for me. As do 14 and 16. I also spent a few minutes trying to get one column to be the same icon. This is a fun little project.