Fanatical order page Steam links

This snippet adds a link to Steam for each item in a purchased bundle on Fanatical. You can either use the bookmarklet, or use the snippet directly by pasting it into the browser console.

Bookmarklet: Fanatical steam links.

((document) => {
for (const game of document.querySelectorAll(".game-name")) {
const name = game.innerText;
const link = document.createElement("a");
"" +
encodeURIComponent(name) +
link.setAttribute("target", "_blank");
link.innerText = name;