snippets.zerodogg.org

Humble Bundle Steam links

This snippet adds a link to Steam for each item in a Humble Bundle. It works on a bundle page, choice page, the page of a purchased bundle and in the store. You can either use the bookmarklet, or use the snippet directly by pasting it into the browser console.

Bookmarklet: Humble Steam links.

$(".item-title, .key-container .key-list .key-redeemer .heading-text h4, .content-choice-title, .product-header-view .human_name-view, .entities-list .entity-title").each(
  function () {
    let $t = $(this);
    $t.css({'overflow':'visible'});
    $('<a target="_blank" onclick="event.stopPropagation()" />')
      .attr(
        "href",
        "https://duckduckgo.com/?q=!+steam+"+
          encodeURIComponent($t.text().trim())
      )
      .attr('rel','noreferrer')
      .attr("style",
      "color:inherit;font-style:italic;display:block;")
      .text("[Steam]")
      .appendTo($t);
  }
);