snippets.zerodogg.org

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");
    link.setAttribute(
      "href",
      "https://store.steampowered.com/search/?term=" +
        encodeURIComponent(name) +
        "&ignore_preferences=1"
    );
    link.setAttribute("target", "_blank");
    link.innerText = name;
    game.replaceChildren(link);
  }
})(document);