Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
4,554
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.47 KB | None | 0 0
  1. (function()
  2. {
  3. if( location.href.match( /^https:\/\/store\.steampowered\.com\/account\/licenses\/?$/ ) === null )
  4. {
  5. alert( 'Please run this on Steam\'s account page details: https://store.steampowered.com/account/licenses/' );
  6.  
  7. window.location = 'https://store.steampowered.com/account/licenses/';
  8.  
  9. return;
  10. }
  11.  
  12. var freePackages =
  13. [
  14. 21360, // [REMOVE] Dragon Nest Europe
  15. 25518, // [REMOVE] Arma 2: DayZ Mod
  16. 30722, // [REMOVE] Heroes of Havoc
  17. 30798, // [REMOVE] World War II Online
  18. 31208, // [REMOVE] Dofus
  19. 33753, // [REMOVE] AION Free-to-Play
  20. 37546, // [REMOVE] Sven Co-op Dedicated Server
  21. 48848, // [REMOVE] Company of Heroes: Eastern Front
  22. 49612, // [REMOVE] Granado Espada
  23. 52601, // [REMOVE] Gigantic
  24. 53898, // [REMOVE] Heavy Metal Machines
  25. 54405, // [REMOVE] The Exiled
  26. 60061, // [REMOVE] Google Earth VR
  27. 60086, // [REMOVE] NASCAR '15 Victory Edition Demo
  28. 61841, // [REMOVE] Fast Detect
  29. 63370, // [REMOVE] Rumble Fighter: Unleashed
  30. 64924, // [REMOVE] Construct: Embers of Life
  31. 65638, // [REMOVE] The Elder Scrolls: Legends
  32. 67948, // [REMOVE] Starpoint Gemini 2: Origins
  33. 68997, // [REMOVE] Retro Game Crunch Soundtrack
  34. 69762, // [REMOVE] RaceRoom Dedicated Server
  35. 70962, // [REMOVE] Alteil: Horizons
  36. 71575, // [REMOVE] Mindshow
  37. 72217, // [REMOVE] Florensia
  38. 74164, // [REMOVE] 9Dragons
  39. 74478, // [REMOVE] High Fidelity
  40. 74984, // [REMOVE] Littlstar VR Cinema
  41. 76284, // [REMOVE] Anarchy Online
  42. 76345, // [REMOVE] The Spookening
  43. 76556, // [REMOVE] RPG Tycoon Demo
  44. 76740, // [REMOVE] Deus Ex: Revision
  45. 76850, // [REMOVE] Business Tour - Online Multiplayer Board Game
  46. 77266, // [REMOVE] Walkerman Prologue
  47. 78408, // [REMOVE] Bitku
  48. 79653, // [REMOVE] Tomorrow
  49. 80392, // [REMOVE] The Juicer - Official Soundtrack
  50. 80623, // [REMOVE] UniBall
  51. 81065, // [REMOVE] The Stanford Ocean Acidification Experience
  52. 81638, // [REMOVE] Warhammer: Vermintide VR - Hero Trials
  53. 82891, // [REMOVE] Space Needle VR
  54. 83229, // [REMOVE] Skyforge
  55. 85376, // [REMOVE] Eye of the Owl
  56. 86858, // [REMOVE] Gods and Idols
  57. 88254, // [REMOVE] The Madness of Little Emma Demo
  58. 88823, // [REMOVE] Project CARS - Pagani Edition
  59. 89020, // [REMOVE] AdventureQuest 3D
  60. 89490, // [REMOVE] Rytmik Player
  61. 90118, // [REMOVE] XCOM 2: War of the Chosen - Propaganda Center
  62. 91314, // [REMOVE] Kiya
  63. 91330, // [REMOVE] Grimoire: Manastorm
  64. ];
  65.  
  66. var ownedPackages = {};
  67.  
  68. jQuery( '.account_table a' ).each( function( i, el )
  69. {
  70. var match = el.href.match( /javascript:RemoveFreeLicense\( ([0-9]+), '/ );
  71.  
  72. if( match !== null )
  73. {
  74. ownedPackages[ +match[ 1 ] ] = true;
  75. }
  76. } );
  77.  
  78. var i = 0,
  79. loaded = 0,
  80. package = 0,
  81. total = freePackages.length,
  82. modal = ShowBlockingWaitDialog( 'Executing…',
  83. 'Please wait until all requests finish. Ignore all the errors, let it finish.' );
  84.  
  85. for( ; i < total; i++ )
  86. {
  87. package = freePackages[ i ];
  88.  
  89. if( ownedPackages[ package ] )
  90. {
  91. loaded++;
  92. continue;
  93. }
  94.  
  95. jQuery.post(
  96. '//store.steampowered.com/checkout/addfreelicense',
  97. {
  98. action: 'add_to_cart',
  99. sessionid: g_sessionID,
  100. subid: package
  101. }
  102. ).always( function( )
  103. {
  104. loaded++;
  105.  
  106. modal.Dismiss();
  107.  
  108. if( loaded >= total )
  109. {
  110. location.reload();
  111. }
  112. else
  113. {
  114. modal = ShowBlockingWaitDialog( 'Executing…',
  115. 'Loaded <b>' + loaded + '</b>/' + total + '.' );
  116. }
  117. }
  118. );
  119. }
  120. }());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement