zynga.com的书签不起作用

时间:2012-09-08 21:47:53

标签: javascript firefox google-chrome bookmarklet

这个自动声明zynga.com奖励的书签当我点击它时没有任何作用但是对它的创建者来说是正常的。 我不知道能够弄清楚它为什么不适合我。创建者使用firefox,我在firefox和chrome中都尝试过它,它什么也没做。我试图更新浏览器和所有插件,但没有任何工作。如果你能查看代码,看看是否有什么会导致问题,谢谢。

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);

1 个答案:

答案 0 :(得分:1)

for(unclaimedIndex=0;unclaimedIndex=1)语法或逻辑不正确。这可能是你的错误。

提示:

使用像JS Beautifier这样的工具将JS的单行转换为格式正确,易于阅读的代码。

我使用JS Bin检查警告和语法错误。