// ==UserScript==
// @name xxx
// @namespace zxvxzv
// @description zxv
// @include http://steamcommunity.com/*/inventory/#pending_gifts
// @version 1
// @match http://steamcommunity.com/*/inventory/#pending_gifts
// @match http://steamcommunity.com/*/inventory#pending_gifts
// @grant none
// ==/UserScript==
var divEls = document.getElementsByTagName("div");
var n = divEls.length;
var i=0;
var j=0;
var idjuegos = new Array();
idjuegos[0]="x";
do{
var aux = divEls[i].id;
var aux2= aux.replace(/[^.0-9]/g,'');
if ((idjuegos[j]!=aux2)&&(aux2!="")&&(aux2>10000)){
if (j!="x"){
j++;
}
idjuegos[j]=aux2;
}
i++;
}while(i<n);
var y = idjuegos.length;
y = y-1;
j=1;
do{
console.log(j + " - "+idjuegos[j]);
//DoAcceptGift( idjuegos[j], false );
j++;
}while (j<=y);