Redirect Removed Steam ID to steamdb

Redirects links to removed AppID's on steampowered.com to steamdb.info

当前为 2017-03-05 提交的版本,查看 最新版本

// ==UserScript==
// @name        Redirect Removed Steam ID to steamdb
// @namespace   https://gf.qytechs.cn/en/users/2205-ryzhehvost
// @description Redirects links to removed AppID's on steampowered.com to steamdb.info
// @description:en Redirects links to removed AppID's on steampowered.com to steamdb.info
// @locale      en-US
// @include     *
// @version     1.1
// @grant       none
// ==/UserScript==
+function () {
    var links = document.getElementsByTagName('a');
    for (var i=links.length-1; i>=0; i--) {
      if (links[i].hasAttribute("href")) {
        if (links[i].getAttribute("href").includes("steampowered")) {
	  links[i].setAttribute("href",links[i].getAttribute("href").replace(/(http.{0,1}:\/\/store\.steampowered\.com\/)(.*)\/(\d+)(.*)/,"$1$2\/$3$4#$2$3"));
	}
      }
    }
  var res;
  if (res=window.location.href.match(/http.{0,1}:\/\/store\.steampowered\.com\/#(\D+)(\d+)/)) {
    window.location = "https:\/\/steamdb.info\/"+res[1]+"\/"+res[2];
  }
}();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址