Steam Store - Free Packages Button

This userscript adds a button to the steam licenses page that adds free packages.

当前为 2016-12-21 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Steam Store - Free Packages Button
  3. // @namespace Royalgamer06
  4. // @version 1.0
  5. // @description This userscript adds a button to the steam licenses page that adds free packages.
  6. // @author Royalgamer06
  7. // @include /^https:\/\/store\.steampowered\.com\/account\/licenses\/?$/
  8. // @connect https://steamdb.info/freepackages/
  9. // @grant GM_xmlhttpRequest
  10. // ==/UserScript==
  11.  
  12. jQuery(document).ready(function() {
  13. jQuery(".breadcrumbs").append("<a id='btnFreePackages' class='btn_green_white_innerfade btn_medium' href='javascript:void(0)' style='float:right;width:170px;'><span style='text-align:center;'>Get Free Packages</span></a>");
  14. jQuery("#btnFreePackages").click(function() {
  15. jQuery("#btnFreePackages span").html("<img src='https://steamcommunity-a.akamaihd.net/public/images/login/throbber.gif'></img>");
  16. GM_xmlhttpRequest({
  17. method: "GET",
  18. url: "https://steamdb.info/freepackages/",
  19. onload: function(response) {
  20. jQuery.globalEval(jQuery("#freepackages", response.responseText).text());
  21. jQuery("#btnFreePackages").html("<span style='text-align:center;'>Get Free Packages</span");
  22. }
  23. });
  24. });
  25. });