Advanced

Stopping Checkers on found date

Stopping Checkers on found date
August 16, 2021 01:23PM
Howdy,

I maintain a couple of variation on Jasmer checkers and am thinking of adding a check to see if they are found already. With this information the checker could override the end date and get rid of the long list of people who "do not meet the requirements" because they found it ages ago.

The snippet I am thinking of adding to mine looks like:

--deal with already found so status does not thrash
local alreadyfound = PGC.GetFinds(profileId, { fields = {'gccode',  'visitdate'}, order = 'OLDESTFIRST', filter = {gccodes = {args[1].gccode} }})


if #alreadyfound >0 then
  if conf.end_date=="today" or conf.end_date>alreadyfound[1].visitdate then
    conf.end_date=alreadyfound[1].visitdate
  end
end

This should help tidy up some pages for cache owners and users with the Tampermonkey scripts.

Any thoughts?

Thanks



Edited 1 time(s). Last edit at 08/16/2021 01:59PM by sloth96. (view changes)
Re: Stopping Checkers on found date
August 16, 2021 05:01PM
I like the idea; i would just make the point that the output should be very clear that the result has been calculated in this way. I may see if any of my scripts could be altered in this way…
Sorry, you do not have permission to post/reply in this forum.