Experience the Future of Creativity!

/* ============================================================ FutureImaging.store - shipping note under Add to Bag (v4) ASCII-only, SPA-safe, bulletproof button finder. ============================================================ */ (function () { var NOTE_CLASS = 'fi-shipping-note'; var NOTE_TEXT = "Shipping calculated at checkout - our print partner's direct rate, no handling fees, no markup. You'll see your delivery estimate before you pay."; function findButton() { var btn = document.querySelector('.ecwid-btn--addToBag, button[class*="addToBag"]'); if (btn) return btn; var buttons = document.querySelectorAll('button'); for (var i = 0; i < buttons.length; i++) { var t = buttons[i].textContent || ''; if (/add\s+to\s+bag/i.test(t)) return buttons[i]; } return null; } function placeNote() { if (!document.body) return false; if (document.querySelector('.' + NOTE_CLASS)) return true; var btn = findButton(); if (!btn || !btn.parentNode) return false; var note = document.createElement('div'); note.className = NOTE_CLASS; note.textContent = NOTE_TEXT; note.setAttribute('style', 'margin-top:10px;font-size:13px;opacity:.85;line-height:1.5;'); btn.parentNode.insertBefore(note, btn.nextSibling); return true; } function init() { if (placeNote()) return; if (!document.body) { setTimeout(init, 300); return; } var obs = new MutationObserver(function () { if (placeNote()) obs.disconnect(); }); obs.observe(document.body, { childList: true, subtree: true }); setTimeout(function () { obs.disconnect(); }, 15000); } function reset() { var old = document.querySelector('.' + NOTE_CLASS); if (old && old.parentNode) old.parentNode.removeChild(old); init(); } var hookTries = 0; function hookEcwid() { try { if (window.Ecwid && Ecwid.OnPageLoaded && Ecwid.OnPageLoaded.add) { Ecwid.OnPageLoaded.add(function () { reset(); }); return; } } catch (e) { /* keep polling */ } if (++hookTries < 60) setTimeout(hookEcwid, 500); } function start() { init(); hookEcwid(); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', start); } else { start(); } })();