Auto-claim Zynga Rewards (Everybody & Friends)

Here’s a little bookmarklet I wrote that you can add use automatically collect Zynga rewards while you’re playing games over at Zynga.com. It seems to work for all rewards regardless of which game you’re playing (though I primarily use it for CastleVille).

javascript:var classesPublic='zui_list_itemsContainer zui_zdc_gameboard_rts_rtsList_itemsContainer zui_zdc_gameboard_rts_rtsPublicList_itemsContainer';var classesNeighbors='zui_list_itemsContainer zui_zdc_gameboard_rts_rtsList_itemsContainer zui_zdc_gameboard_rts_rtsNeighborList_itemsContainer';var classesButtons='zui zui_button zui_enabled zui_button_enabled zui_zdc zui_button_zdc zui_zdc_enabled zui_button_zdc_enabled zui_button_tiny zui_button_white';var unclaimedRewardsNeighbors,unclaimedRewardsPublic;var unclaimedNeighborsInit=unclaimedPublicInit=true;function collectRewardsNeighbors(){for(unclaimedIndex=0;unclaimedIndex=1){if(unclaimedNeighborsInit){unclaimedNeighborsInit=false;collectRewardsNeighbors();}else{setTimeout('collectRewardsNeighbors()',1000);}}},false);var parentUnclaimedPublic=document.getElementsByClassName(classesPublic)[0];parentUnclaimedPublic.addEventListener('DOMSubtreeModified',function(){unclaimedRewardsPublic=parentUnclaimedPublic.getElementsByClassName(classesButtons);if(unclaimedRewardsPublic.length>=1){if(unclaimedPublicInit){unclaimedPublicInit=false;collectRewardsPublic();}else{setTimeout('collectRewardsPublic()',1000);}}},false);

What you need to do, is copy the code above and paste it into a new bookmark within your browser. Couldn’t be easier 🙂

Note: This script requires a browser that supports the DOMSubtreeModified – DOM Level 2 Mutation Event (eg: IE9, FF, Safari and Chrome)

One thought on “Auto-claim Zynga Rewards (Everybody & Friends)”

Leave a Reply

Your email address will not be published. Required fields are marked *