Skip to content

Instantly share code, notes, and snippets.

(async function bestAutoRate({
attempts = 5000,
clickDelay = 2010,
raitDelay = 4010,
popupWait = 9000,
// Массив подстрок; если указать — метки, у которых img.src содержит одну из подстрок, будут пропускаться
skipIconSubstrings = ['-V']
} = {}) {
const sleep = ms => new Promise(r => setTimeout(r, ms));
const markerSelector = '.leaflet-marker-icon.results-map-marker.leaflet-interactive';