您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Fix App Image Not Found on steam pages
- // ==UserScript==
- // @name Fix App Image Not Found
- // @namespace https://greasyfork.org/users/2205
- // @version 0.1
- // @description Fix App Image Not Found on steam pages
- // @author Rudokhvist
- // @match https://steamcommunity.com/id/*
- // @match https://steamcommunity.com/profiles/*
- // @license Apache-2.0
- // @run-at document-idle
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict';
- var images=document.querySelectorAll("img[src$='338200c5d6c4d9bdcf6632642a2aeb591fb8a5c2.gif']");
- if (!images.length) { return; }
- for (var index = 0;index<images.length;index++) {
- var appidRegex = images[index].parentElement.href.match(/(?:store\.steampowered|steamcommunity)\.com\/(app|market\/listings)\/(\d+)\/?/);
- if (appidRegex != null) {
- var appid = appidRegex[2];
- if (appid != 223530) { //TODO: check if there is other exceptions. if there are - make more complex condition here
- images[index].src="https://steamcdn-a.akamaihd.net/steam/apps/" + appid + "/capsule_184x69.jpg";
- }
- }
- }
- })();