Skip to content

Instantly share code, notes, and snippets.

@MalikAQayum
Last active October 27, 2018 04:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MalikAQayum/61db530e94f1d19ad57f7a931dd39e32 to your computer and use it in GitHub Desktop.
Save MalikAQayum/61db530e94f1d19ad57f7a931dd39e32 to your computer and use it in GitHub Desktop.
// @description changes the profile links to badge page links, for quick checking which duplicate cards a profile has for said badge.
// ==UserScript==
// @name Steam badge page linker
// @namespace https://steamcommunity.com/id/MalikQayum
// @version 0.2
// @description changes the profile links to badge page links, for quick checking which duplicate cards a profile has for said badge.
// @author MalikQayum
// @include /^https?:\/\/steamcommunity\.com[/]+(id|profiles)[/]+[^/]+\/gamecards[/]+[^/]+(\/|)$/
// @grant none
// ==/UserScript==
(function() {
'use strict';
$J("a[class^='persona']").each(function() {
var $this = $J(this);
var oldhref = $this.attr("href");
$this.attr("href", oldhref + '/gamecards/'+location.href.split("/")[6]+'/').attr('target','_blank');
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment