Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Steam Market History Button
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description Adds a button below steam market price graphs to open the sale json.
- // @author jh34ghu43gu
- // @match https://steamcommunity.com/market/listings/440/*
- // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
- // @require http://code.jquery.com/jquery-latest.js
- // @require https://gist.github.com/raw/2625891/waitForKeyElements.js
- // @grant GM_getValue
- // ==/UserScript==
- console.log("History Button Script Active");
- var urlStart = "https://steamcommunity.com/market/pricehistory/?appid=440&market_hash_name=";
- waitForKeyElements(".jqplot-target", addButton);
- function addButton(jNode) {
- console.log(urlStart + document.getElementsByClassName("market_listing_nav")[0].childElements()[1].innerText);
- var button = document.createElement("a");
- button.href = urlStart + document.getElementsByClassName("market_listing_nav")[0].childElements()[1].innerText;
- button.id = "pricehistory_button";
- button.innerText = "Price History JSON";
- jNode[0].parentNode.insertBefore(document.createElement("br"), jNode[0]);
- jNode[0].parentNode.insertBefore(button, jNode[0]);
- }
Add Comment
Please, Sign In to add comment