var trackerList = [];

function populateTrackerList(patternList)
{
    trackerList = [];

    for (var i = 0; i < patternList.length; ++i)
        trackerList.push(new RegExp(patternList[i].slice(1, -1), "i"));
}

function clearTrackerList()
{
    trackerList = [];
}

function urlIsTracker(url)
{
    const length = trackerList.length;
    for (var i = 0; i < length; ++i) {
        if (trackerList[i].test(url))
            return true;
    }
    
    return false;
}
