FA - Filter by Max Distance

DeletedUser

Guest
Code:
javascript:
var maxDist = 30;
/** 
 *    author: Patricier
 *    name:    FA-filter
 *    version:    1.0.0 (modified)
 *    modified by StivenBauss to filter distances
 */
function filter()
{
    var div = document.getElementById('am_widget_Farm');
    var td = div.getElementsByTagName('td');
    td[0].innerHTML += '<br>Villages you attack are being filtered';
    for (var i = 1; i< td.length; i++)
    {
        if (td[i].innerHTML > maxDist)
        {
            td[i].parentNode.style.display = 'none';
        }
    }    
}

/*=== main ====*/
filter();
void 0;

This script filters out reports in the FA that are over a certain distance.
To set that distance just change this value in the beginning of the script:
Code:
maxDist = 30

Click the script in the FA, and only reports with the smaller distance will remain.
 
Last edited by a moderator:

DeletedUser3214

Guest
Wouldn't it be easier just to have a quicklink to FA that is sorted by distance so links start low?
 

DeletedUser

Guest
this is if you also want to filter by time.

e.g you want the latest reports, but only ones within a certain radius.
 

DeletedUser3214

Guest
I don't see how that is better than just sorting by distance and only farming up to a certain amount of squares away - and FA tells you the run time if you cover over C anyway
 

DeletedUser

Guest
Some people farm based on how long it's been since they last farmed a village, so I can see how a filter might be useful for at least a little less thought process :).
 

DeletedUser3214

Guest
Some also prefer to send their troops to villages farther out that got full hauls then closer in that didn't because they think its more efficient, but I don't see the logic in either of those ideologies
 
Top