Stock/not-in-stock scraper - slight reliability improvement

minor-stock-scraper
dgtlmoon 3 months ago
parent f255165571
commit 4b1cfd7bd3

@ -154,11 +154,15 @@ function isItemInStock() {
}
elementText = "";
try {
if (element.tagName.toLowerCase() === "input") {
elementText = element.value.toLowerCase().trim();
} else {
elementText = getElementBaseText(element);
}
} catch (e) {
console.warn('stock-not-in-stock.js scraper - handling element for gettext failed', e);
}
if (elementText.length) {
// try which ones could mean its in stock

Loading…
Cancel
Save