Selaa lähdekoodia

[Rules] Improve URL_COUNT_ODD rule

tags/1.6.0
Vsevolod Stakhov 7 vuotta sitten
vanhempi
commit
acd5eaa40c
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1
    1
      rules/misc.lua

+ 1
- 1
rules/misc.lua Näytä tiedosto

local urls = task:get_urls() or {} local urls = task:get_urls() or {}
local nurls = fun.filter(function(url) local nurls = fun.filter(function(url)
return not url:is_html_displayed() return not url:is_html_displayed()
end, urls):foldl(function(acc, val) return acc + 1 end, 0)
end, urls):foldl(function(acc, val) return acc + val:get_count() end, 0)


if nurls % 2 == 1 then if nurls % 2 == 1 then
return true, 1.0, tostring(nurls) return true, 1.0, tostring(nurls)

Loading…
Peruuta
Tallenna