/** * SPDX-License-Identifier: CC0-1.0 * * Copyright (C) 2026 Woj. Kosior */ if (false) { /* #+begin_src background-js */ jsBlockUrls = /* #+begin_src manifest-jq .matches = # */ ["https://botland.store/*", "https://botland.com.pl/*", "https://botland.cz/*", "https://botland.de/*"] } /* #+end_src *both* */ /* * Make images and some useful information display on botland.com.pl & friends. * * The people at botland.com.pl have so far been nice to me and allowed me to * make an order via email. It is therefore possible to buy something from them * without running any nonfree JS. */ for (const img of document.querySelectorAll('img.lazyload[data-src]')) { img.src = img.getAttribute('data-src'); img.style.opacity = 1; } /* * The code below has been written back before this simple extension was * created. It hasn't been tested as part of the simple extension, but is * nonetheless placed here opportunistically, in case it still proves useful to * someone. */ for (const varnish of document.querySelectorAll(".varnish-content")) { varnish.style.display = "block"; } for (const widget of document.querySelectorAll(".product-availability-widget")) { widget.style.display = "initial"; } for (const placeholder of document.querySelectorAll(".ph-item")) { placeholder.remove(); } let firstAvailabilityBox = true; for (const box of document.querySelectorAll(".product-availability-info__box")) { if (firstAvailabilityBox) { const span = document.createElement("span"); span.innerText = box.getAttribute("data-text"); box.parentElement.replaceWith(span); firstAvailabilityBox = false; } else { box.remove(); } } for (const priceElem of document.querySelectorAll(".product-prices-inner, .product-price")) { priceElem.classList.remove("visibility-hidden"); } for (const loader of document.querySelectorAll("i.varnish-loader")) { loader.remove(); }