// Small behaviours for Supermarket's pages. Loaded as a file because the // Content-Security-Policy allows no inline scripts. (function () { "use strict"; // Show the fields for the chosen AI provider ([data-show-for]). function syncProvider() { var chosen = document.querySelector('input[data-toggle="provider"]:checked'); if (!chosen) return; document.querySelectorAll("[data-show-for]").forEach(function (el) { el.hidden = el.getAttribute("data-show-for") !== chosen.value; }); } document.addEventListener("change", function (e) { if (e.target.matches('input[data-toggle="provider"]')) syncProvider(); }); document.addEventListener("click", function (e) { // Copy a
's text: