NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name FarmList Select // @namespace http://your.homepage/ // @version 0.1 // @description enter something useful // @author You // @match http://tx3.travian.us/build.php?gid=16&tt=99 // @require http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js // @grant GM_getValue // @grant GM_setValue // ==/UserScript== $("div.raidListTitleButtons").html($("div.raidListTitleButtons").html()+'| <img src="img/x.gif" class="iReport iReport1" id="img1" alt="Won as attacker without losses." > | <img id="img2" src="img/x.gif" class="carry full" alt="">'); /* $('input:checkbox.markSlot').each(function () { $(this).attr('checked', true); }); function explode(){ $( "#raidListMarkAll430" ).trigger( "click" ); $( "div:contains('start raid')" ).trigger('click'); console.log( "Done!" ); } */ $('.slotRow').each(function(){ var allHTML=$(this).html(); if (allHTML.indexOf("Won as attacker without losses") >= 0) $(this ).find("input:checkbox").attr('checked', true); //$( "div:contains('start raid')" ).trigger('click'); }); $( "#img1" ).each(function(){ $(this).click(function() { $('.slotRow').each(function(){ var allHTML=$(this).html(); if (allHTML.indexOf("Won as attacker without losses") >= 0) $(this ).find("input:checkbox").attr('checked', true); //$( "div:contains('start raid')" ).trigger('click'); }); }); }); $( "#img2" ).click(function() { $('.slotRow').each(function(){ var allHTML=$(this).html(); if (allHTML.indexOf("carry full") >= 0) $(this ).find("input:checkbox").attr('checked', true); }); });