1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
| (function () { if (location.href.match(/^https:\/\/store\.steampowered\.com\/account\/licenses\/?$/) === null) { alert('请在Steam帐号明细页面运行这些代码: https://store.steampowered.com/account/licenses/');
window.location = 'https://store.steampowered.com/account/licenses/';
return; }
var freePackages = [ 39166, 13261, 32032, 59373, 33694, 88162, 36561, 58514, 117526,
85604, 21478, 50861, 21473, 31538, 32287, 38085, 72261, 81026, 47333, 38820, 69802, 60341, 21416, 63207, 59253,
35063, 74465,
21101, 21102, 21103, 21104, 21105, 21106, 21107, 21108, 21109, 21110, 21111, 21113, 21114, 21115, 21117, 21118, 21119, 21120, 21121, 21122, 21123, 21124, 21125, 21126, 21127, 21128, 21129, 21130, 21131, 21132, 21133, 21134, 21135, 21136, 21137, 21138, 21139, 21140, 21141, 21142, 21143, 21144, 21145, 21146, 21147, 21148, 21149, 21150, 21151, ];
var ownedPackages = {};
jQuery('.account_table a').each(function (i, el) { var match = el.href.match(/javascript:RemoveFreeLicense\( ([0-9]+), '/);
if (match !== null) { ownedPackages[+match[1]] = true; } });
var i = 0, loaded = 0, package = 0, total = freePackages.length, modal = ShowBlockingWaitDialog('努力执行中...', '请耐心等待,如果有错误请无视,请耐心等待脚本加载完毕');
for (; i < total; i++) { package = freePackages[i];
if (ownedPackages[package]) { loaded++; continue; }
jQuery.post( '//store.steampowered.com/checkout/addfreelicense', { action: 'add_to_cart', sessionid: g_sessionID, subid: package } ).always(function () { loaded++;
modal.Dismiss();
if (loaded >= total) { location.reload(); } else { modal = ShowBlockingWaitDialog('执行中...', '加载至 <b>' + loaded + '</b>/' + total + '.'); } } ); } }());
|