Connections Bookmarklet Hack

I made myself a bookmarklet for the NYT Connections game. It allows you to set the colors of the squares as you are working out the solution. Kind of feels like cheating – part of the game is keeping it all in your head, so I probably won’t use it – but with AI, it took me all of 5 minutes to make!

To install it drag this link to your bookmark bar – then just click it when you have the puzzle open.

Connections Bookmarklet

And the code:

javascript: (function () {
  const colors = {
    Yellow: "#f9df6d",
    Green: "#a0c35a",
    Blue: "#b0c4ef",
    Purple: "#ba81c5",
    Clear: null,
  };
  function showMenu(e, square) {
    e.preventDefault();
    e.stopPropagation();
    const menu = document.createElement("div");
    menu.style.cssText = `position:fixed;top:${e.clientY}px;left:${e.clientX}px;background:white;border:1px solid #ccc;border-radius:4px;box-shadow:0 2px 8px rgba(0,0,0,0.2);z-index:10000;min-width:120px`;
    const items = ["Yellow", "Green", "Blue", "Purple", "Clear"];
    items.forEach((color) => {
      const item = document.createElement("div");
      item.textContent = color;
      item.style.cssText = `padding:8px 12px;cursor:pointer;border-bottom:1px solid #eee`;
      item.onmouseover = () => (item.style.backgroundColor = "#f0f0f0");
      item.onmouseout = () => (item.style.backgroundColor = "white");
      item.onclick = (e) => {
        e.stopPropagation();
        square.style.backgroundColor = colors[color] || "";
        menu.remove();
      };
      menu.appendChild(item);
    });
    menu.lastChild.style.borderBottom = "none";
    document.body.appendChild(menu);
    setTimeout(() => {
      const closeMenu = () => {
        menu.remove();
        document.removeEventListener("click", closeMenu);
      };
      document.addEventListener("click", closeMenu);
    }, 0);
  }
  const squares = document.querySelectorAll('[data-testid="card-label"]');
  let count = 0;
  squares.forEach((square) => {
    square.addEventListener("contextmenu", (e) => showMenu(e, square));
    square.style.cursor = "context-menu";
    count++;
  });
  if (count === 0) {
    alert("Could not find game squares.");
  }
})();

And Now for Something Completely Different… Pumpkin Pie

Pumpkin pie is one of my favorite pies. A number of years ago I spent a fall cooking all of the different pumpkin pie recipes I could find. Here is a distillation of the best parts of all of them – so this is my definitive Pumpkin Pie Recipe.

It is the worlds best pumpkin pie*

*Note: I mean for me, your opinion might be that this is terrible – people like different things, I am not here to tell you what is good for you.

Ingredients – Makes 2 Pies:

3 eggs - separated
1 C sugar + 1 glug molasses
2 TSP cornstarch
Pinch Salt
1 1/4 C Spiced Pumpkin
1/2 C milk
1 can Evaporated Milk
1 TSP vanilla

+ 2 Pie Crusts

Directions:

Dock and par-bake your pie crusts.

In a large bowl, mix everything except egg whites.

In medium bowl: Beat whites till stiff, then fold into other stuff.

Pour into pie crusts.

Bake @425F for 10 minutes.

lower oven to 325F till toothpick comes out clean – around 30 minutes.

Additional notes: Once mixed, this will keep in a fridge up to a week. The egg whites will deflate over time, so the pie will be more dense the longer you wait to cook it. Both versions are good, hard to say which one is better.