/*
EMERALD QUICK SHIP - BOARDS CARDS V1
November 18, 2026
One self-contained script for the Boards
category (EvoX category 1366571). Same card design as Desks and
Seating: two-line titles that name the finish or material, three
one-line benefit bullets, Category / Collection / Item Code, list
price with Emerald Savings when the item is sold each and the native
price is at least 36% below verified list, 140px image area.
Runs at both addresses of the category (/category/1366571-... and
/boards--25) by checking the page's category id.
Native prices, quantity box and Add to Cart are never changed.
Cards without a price or Add to Cart button (signed-out visitors)
stay native.
*/
(() => {
'use strict';
if (!document.body || !document.body.classList.contains('ex-categoryid-1366571')) return;
if (window.EQS_BD?.active) return;
const VERSION = 'EQS_BOARDS_V1B_2026_11_18';
// ---- Items removed from the Boards page, plus the empty EvoX placeholder tile (hidden for every visitor) ----
const HIDE_SKUS = [];
if (!document.getElementById('eqs-tables-hide')) {
const hs = document.createElement('style');
hs.id = 'eqs-tables-hide';
hs.textContent = HIDE_SKUS.map(k => `.griditems .tileparent.product[data-sku="${k}" i]`).concat('.griditems .tileparent.tileparent_placeholder').join(',') + '{display:none!important}';
(document.head || document.documentElement).appendChild(hs);
}
const CARD = '.tileparent.product';
const MIN_DISCOUNT = 36;
// Items sold as a set or carton: the native price covers this many chairs.
const PER_SET = {};
// sku: [title, bullet1, bullet2, bullet3, collection, listPrice, imgScale, imgX, imgY]
const DATA = {
"COEMCAB3672CL":["Spry 36\" x 72\" Mobile Board, Clear Acrylic Panel", "Aluminum frame rolls with ease", "Two locking casters hold steady", "Gang boards for semi-privacy", "Spry", 1122, 0.68, -0.0, 1.0],
"COEMCAB4872CL":["Spry 48\" x 72\" Mobile Board, Clear Acrylic Panel", "Aluminum frame rolls with ease", "Two locking casters hold steady", "Gang boards for semi-privacy", "Spry", 1167, 0.68, -0.0, 1.0],
"COEMCLB4872GR":["Spry 48\" x 72\" Mobile Board, Charcoal Laminate & Acrylic", "Laminate plus clear acrylic", "Two locking casters hold steady", "Gang boards for semi-privacy", "Spry", 1167, 0.68, -1.0, 1.7],
"COEOS05071MSWH":["36\" x 48\" Magnetic Steel Whiteboard, Aluminum Frame", "Steel surface resists ghosting", "Snap-on pen tray included", "10-year surface warranty", "ViZual", 440, 0.79, -0.4, 1.6],
"COEOS0801MGWH":["36\" x 48\" Magnetic Glass Dry-Erase Board, White", "4mm tempered glass surface", "Magnets and pen tray included", "Lifetime surface warranty", "ViZual", 834, 0.835, -2.5, -2.1],
"COEOS1201MGWH":["48\" x 72\" Magnetic Glass Dry-Erase Board, White", "4mm tempered glass surface", "Magnets and pen tray included", "Lifetime surface warranty", "ViZual", 1743, 0.835, -2.5, -2.1],
"COEOS21071MSWH":["48\" x 96\" Magnetic Steel Whiteboard, Aluminum Frame", "Steel surface resists ghosting", "Snap-on pen tray included", "10-year surface warranty", "ViZual", 1149, 0.79, -0.4, 1.6],
"COEOS2501MGWH":["48\" x 96\" Magnetic Glass Dry-Erase Board, White", "4mm tempered glass surface", "Magnets and pen tray included", "Lifetime surface warranty", "ViZual", 2428, 0.835, -2.5, -2.1],
"COEOS27071MSWH":["48\" x 72\" Magnetic Steel Whiteboard, Aluminum Frame", "Steel surface resists ghosting", "Snap-on pen tray included", "10-year surface warranty", "ViZual", 865, 0.79, -0.4, 1.6],
"COEOSL0701MGWH":["24\" x 36\" Magnetic Glass Dry-Erase Board, White", "4mm tempered glass surface", "Magnets and pen tray included", "Lifetime surface warranty", "ViZual", 450, 0.835, -2.5, -2.1]
};
const DELIVERY = [
[/^COE/, '3\u20135 Day Delivery']
];
const CATEGORY_LABEL = { 'Executive & Conference Seating': 'Executive & Conference' };
const TRUCK = '';
const CART = '';
// ---- Retire the older P11 adapter if it is still loaded ----
// ---- Styles (scoped to styled Boards cards) ----
const S = 'html body .griditems.gridlist-grid > .tileparent.product.eqs-bd';
const style = document.createElement('style');
style.id = 'eqs-tables-v1-style';
style.textContent = `
${S}{box-sizing:border-box!important;float:left!important;width:calc(25% - 12px)!important;height:455px!important;min-height:455px!important;margin:0 6px 14px!important;padding:0 6px!important;background:#fff!important;border:.667px solid rgb(203,216,212)!important;border-radius:14px!important;box-shadow:none!important;overflow:hidden!important}
@media (max-width:1199px){${S}{width:calc(33.333% - 12px)!important}}
@media (max-width:991px){${S}{width:calc(50% - 12px)!important}}
@media (max-width:767px){${S}{width:calc(100% - 12px)!important}}
${S} > .tile{display:flex!important;flex-direction:column!important;height:454px!important;min-height:0!important;padding:0 14px 8px!important;margin:0!important;border:0!important;background:transparent!important}
${S} .badges-wrapper,${S} .product-list-actions,${S} .addtoquicklist-wrapper,${S} .product-compare-action,${S} .emerald-closeout-deal-badge,${S} .live-inventory-v2-shipping,${S} .live-inventory-v2-wrapper,${S} .product-name,${S} .product-sku,${S} .product-category,${S} .indicators-grid,${S} .product-points,${S} .multiple-uom-label,${S} .eqs-p542-description,${S} .eqs-p3-collection,${S} .product-short-description,${S} .short-description{display:none!important}
${S} .footer-wrapper-price{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;margin:0!important;padding:0!important}
${S} .product-tile-image{position:relative!important;display:flex!important;justify-content:center!important;align-items:center!important;height:140px!important;min-height:140px!important;max-height:140px!important;overflow:hidden!important;margin:0!important;padding:0!important;flex:0 0 140px!important}
${S} .product-tile-image .text-center,${S} .product-tile-image .imgthumbnail{position:static!important;display:flex!important;justify-content:center!important;align-items:center!important;height:140px!important;width:100%!important;margin:0!important;padding:0!important;overflow:visible!important}
${S} .product-tile-image .thumb-align{display:none!important}
${S} .product-tile-image img{width:200px!important;height:200px!important;min-height:200px!important;max-width:none!important;max-height:none!important;object-fit:contain!important;transform-origin:center center!important;flex:0 0 200px!important;position:absolute!important;top:50%!important;left:50%!important;margin:-100px 0 0 -100px!important}
${S} .ebi-textile-badge{display:none!important}
${S} .footer{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important}
${S} .footer-wrapper{display:flex!important;flex-direction:column!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;position:relative!important}
${S} .footer-wrapper-description{display:flex!important;flex-direction:column!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important}
${S} .eqs-bd-brandrow{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:7px!important;height:37px!important;min-height:37px!important;margin:12px 0 1px!important;padding:0!important}
${S} .eqs-bd-brandrow .brand-label{display:flex!important;align-items:center!important;flex:0 1 auto!important;min-width:0!important;max-width:96px!important;margin:0!important;padding:0!important}
${S} .eqs-bd-brandrow .brand-label a{display:flex!important;align-items:center!important;line-height:0!important;min-width:0!important;max-width:100%!important}
${S} .eqs-bd-brandrow .brand-label img{width:auto!important;height:auto!important;max-width:100%!important;max-height:20px!important;object-fit:contain!important;object-position:left center!important;margin:0!important}
${S} .eqs-bd-delivery{display:inline-flex!important;align-items:center!important;justify-content:flex-end!important;gap:3px!important;flex:0 0 auto!important;white-space:nowrap!important;color:rgb(0,132,61)!important;font:700 11px/14px Arial,sans-serif!important}
${S} .eqs-bd-delivery svg{width:32px!important;height:22px!important;flex:0 0 32px!important;fill:none!important;stroke:currentColor!important;stroke-width:2!important;stroke-linecap:round!important;stroke-linejoin:round!important}
${S} .eqs-bd-title{display:block!important;height:38px!important;min-height:38px!important;max-height:38px!important;overflow:hidden!important;margin:0 0 4px!important;padding:0!important;color:rgb(2,2,2)!important;font:700 14px/19px Arial,sans-serif!important;text-decoration:none!important}
${S} .eqs-bd-title:hover{text-decoration:underline!important}
${S} .eqs-bd-features{display:flex!important;flex-direction:column!important;height:48px!important;min-height:48px!important;margin:0 0 4px!important;padding:0!important}
${S} .eqs-bd-feature{display:flex!important;align-items:flex-start!important;gap:5px!important;height:16px!important;overflow:hidden!important;white-space:nowrap!important;color:rgb(17,17,17)!important;font:12px/16px Arial,sans-serif!important}
${S} .eqs-bd-dot{flex:0 0 10px!important;width:10px!important;color:rgb(67,131,70)!important}
${S} .eqs-bd-meta{display:flex!important;flex-direction:column!important;height:51px!important;min-height:51px!important;margin:0 0 2px!important;padding:0!important;color:rgb(100,116,139)!important;font:11px/17px Arial,sans-serif!important}
${S} .eqs-bd-meta > div{height:17px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
${S} .eqs-bd-meta b{font-weight:600!important;color:rgb(71,85,105)!important}
${S} .eqs-bd-meta .eqs-bd-cat{font-weight:500!important;color:rgb(67,138,98)!important}
${S} .eqs-bd-meta .eqs-bd-code{letter-spacing:-.2px!important}
${S} .eqs-bd-pricebar{display:flex!important;justify-content:space-between!important;align-items:flex-end!important;gap:5px!important;height:55px!important;min-height:55px!important;margin:0 0 10px!important;padding:0!important;box-sizing:border-box!important}
${S} .eqs-bd-list{height:14px!important;margin:0 0 1px!important;color:rgb(71,84,103)!important;font:11px/14px Arial,sans-serif!important;white-space:nowrap!important}
${S} .eqs-bd-list s{color:rgb(102,112,133)!important}
${S} .eqs-bd-price{display:flex!important;align-items:flex-start!important;height:31px!important;color:rgb(67,133,74)!important;font:800 26px/31px Arial,sans-serif!important;letter-spacing:-.5px!important;white-space:nowrap!important}
${S} .eqs-bd-cents{display:block!important;margin:1px 0 0 1px!important;font:800 12px/12px Arial,sans-serif!important;letter-spacing:0!important}
${S} .eqs-bd-savings{margin:0 0 2px!important;text-align:right!important;color:rgb(100,116,139)!important;white-space:nowrap!important}
${S} .eqs-bd-savings-label{font:600 9px/12px Arial,sans-serif!important}
${S} .eqs-bd-savings-pct{font:500 13px/17px Arial,sans-serif!important}
${S} .buttons.group{display:flex!important;flex-direction:row!important;align-items:flex-start!important;gap:7px!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0!important;text-align:left!important}
${S} .inputquantity{width:50px!important;min-width:50px!important;flex:0 0 50px!important;height:44px!important;padding:5px!important;border:.667px solid rgb(216,222,230)!important;border-radius:5px!important;background:#fff!important;text-align:center!important;font:16px Arial,sans-serif!important;margin:0!important}
${S} .live-inventory-v2-add-to-cart-wrapper{display:flex!important;flex:1 1 auto!important;width:auto!important;min-width:0!important;height:44px!important;margin:0!important}
${S} .btn-add-to-cart{display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;width:100%!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0 6px!important;background:rgb(0,128,0)!important;color:#fff!important;border:0!important;border-radius:5px!important;font:700 14px Arial,sans-serif!important;white-space:nowrap!important}
${S} .eqs-bd-carticon{display:inline-flex!important;width:20px!important;height:20px!important;flex:0 0 20px!important}
${S} .eqs-bd-carticon svg{width:20px!important;height:20px!important;fill:none!important;stroke:currentColor!important;stroke-width:2!important}
${S} .eqs-bd-per{align-self:flex-end!important;margin:0 0 4px 7px!important;color:rgb(71,84,103)!important;font:600 12px/14px Arial,sans-serif!important;letter-spacing:0!important;white-space:nowrap!important}
${S} .eqs-bd-brandrow .brand-label:has(img[alt*="National Public" i]){max-width:112px!important;flex:0 0 112px!important}
${S} .eqs-bd-brandrow .brand-label:has(img[alt*="National Public" i]) a{width:100%!important}
${S} .eqs-bd-brandrow .brand-label img[alt*="National Public" i]{width:112px!important;height:auto!important;max-height:none!important;max-width:none!important}
${S} .eqs-bd-brandrow .brand-label:has(img[alt*="Global" i]),${S} .eqs-bd-brandrow .brand-label:has(img[src*="Global" i]){max-width:none!important;flex:0 0 auto!important;overflow:visible!important}
${S} .eqs-bd-brandrow .brand-label:has(img[alt*="Global" i]) a,${S} .eqs-bd-brandrow .brand-label:has(img[src*="Global" i]) a{overflow:visible!important}
${S} .eqs-bd-brandrow .brand-label img[alt*="Global" i],${S} .eqs-bd-brandrow .brand-label img[src*="Global" i]{max-height:46px!important;height:46px!important;width:auto!important;max-width:none!important;margin:-8px 0 -1px -8px!important;position:relative!important;z-index:1!important}
`;
document.head.append(style);
// ---- Helpers ----
const money = n => '$' + Number(n).toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 });
const el = (tag, cls, text) => { const e = document.createElement(tag); if (cls) e.className = cls; if (text != null) e.textContent = text; return e; };
const skuOf = card => (card.dataset.sku || '').trim().toUpperCase();
const deliveryFor = sku => (DELIVERY.find(([re]) => re.test(sku)) || [null, ''])[1];
function nativePrice(card) {
const label = card.querySelector('.footer-wrapper-price .price-label');
if (!label) return NaN;
const raw = label.getAttribute('data-value');
let v = raw != null && raw.trim() !== '' ? Number(raw) : NaN;
if (!Number.isFinite(v)) {
const m = (label.textContent || '').replace(/,/g, '').match(/\$\s*(\d+(?:\.\d{1,2})?)/);
v = m ? Number(m[1]) : NaN;
}
return v;
}
const state = { runs: 0, errors: [], unknown: new Set(), skipped: new Set() };
function build(card, sku, d) {
const q = s => card.querySelector(s);
const desc = q('.footer-wrapper-description');
const fw = q('.footer-wrapper');
const nativeP = q('.footer-wrapper-price');
const button = q('.btn-add-to-cart');
const img = q('.product-tile-image img');
if (!desc || !fw || !nativeP || !button) return false;
// Clean up P11 leftovers
card.classList.remove('eqs-p11');
card.querySelectorAll('.eqs-p542-description,.eqs-p3-collection').forEach(n => n.remove());
// Brand row
let row = q('.eqs-bd-brandrow') || q('.eqs-p542-brandrow');
if (!row) row = el('div');
row.className = 'eqs-bd-brandrow';
row.querySelector('.eqs-p542-delivery')?.remove();
const logo = q('.brand-label');
if (logo && logo.parentElement !== row) row.prepend(logo);
let del = row.querySelector('.eqs-bd-delivery');
if (!del) { del = el('div', 'eqs-bd-delivery'); del.innerHTML = TRUCK + ''; row.append(del); }
del.querySelector('span').textContent = deliveryFor(sku);
if (row.parentElement !== desc || desc.firstChild !== row) desc.prepend(row);
// Title (links to the product page)
const href = q('.product-name a')?.getAttribute('href') || q('.product-tile-image')?.getAttribute('href') || '#';
let title = q('.eqs-bd-title');
if (!title) { title = el('a', 'eqs-bd-title'); row.after(title); }
title.setAttribute('href', href);
title.textContent = d[0];
title.title = d[0];
// Bullets
let feats = q('.eqs-bd-features');
if (!feats) { feats = el('div', 'eqs-bd-features'); title.after(feats); }
feats.replaceChildren(...[d[1], d[2], d[3]].map(t => {
const f = el('div', 'eqs-bd-feature');
f.append(el('span', 'eqs-bd-dot', '\u2022'), el('span', 'eqs-bd-copy', t));
return f;
}));
// Category / Collection / Item Code
const rawCat = (q('.product-category a')?.textContent || '').replace(/\s+/g, ' ').trim();
const cat = CATEGORY_LABEL[rawCat] || rawCat || 'Storage';
let meta = q('.eqs-bd-meta');
if (!meta) { meta = el('div', 'eqs-bd-meta'); feats.after(meta); }
const r1 = el('div'); r1.append(el('b', '', 'Category: '), el('span', 'eqs-bd-cat', cat));
const r2 = el('div'); r2.append(el('b', '', 'Collection: '), el('span', '', d[4]));
const r3 = el('div'); r3.append(el('b', '', 'Item Code: '), el('span', 'eqs-bd-code', sku));
meta.replaceChildren(r1, r2, r3);
// Price bar
let bar = q('.eqs-bd-pricebar');
if (!bar) {
bar = el('div', 'eqs-bd-pricebar');
const left = el('div', 'eqs-bd-left');
left.append(el('div', 'eqs-bd-list'), el('div', 'eqs-bd-price'));
const sav = el('div', 'eqs-bd-savings');
sav.append(el('div', 'eqs-bd-savings-label', 'Emerald Savings'), el('div', 'eqs-bd-savings-pct'));
bar.append(left, sav);
fw.insertBefore(bar, nativeP);
}
// Cart icon
if (!button.querySelector('.eqs-bd-carticon')) {
button.querySelector('.eqs-p542-carticon')?.remove();
const icon = el('span', 'eqs-bd-carticon'); icon.innerHTML = CART; button.prepend(icon);
}
// Image sizing
if (img) {
const t = `translate(${d[7]}px,${d[8]}px) scale(${d[6]})`;
if (img.style.getPropertyValue('transform') !== t) img.style.setProperty('transform', t, 'important');
}
card.dataset.eqsSeat = sku;
card.classList.add('eqs-bd');
return true;
}
function updatePrice(card, sku, d) {
const bar = card.querySelector('.eqs-bd-pricebar');
if (!bar) return;
const sell = nativePrice(card);
const list = Number(d[5]);
const pack = (card.dataset.packUom || '').trim().toUpperCase();
const uom = (card.querySelector('.footer-wrapper-price .uomvalue')?.textContent || '').replace(/[\s/]/g, '').toUpperCase();
const disc = list > 0 && sell > 0 ? (1 - sell / list) * 100 : NaN;
const ok = Number.isFinite(disc) && disc >= MIN_DISCOUNT && pack === 'EA' && (!uom || uom === 'EA');
const listEl = bar.querySelector('.eqs-bd-list');
const priceEl = bar.querySelector('.eqs-bd-price');
const sav = bar.querySelector('.eqs-bd-savings');
const perSet = PER_SET[sku] || 0;
const key = sell + '|' + (ok ? 1 : 0) + '|' + perSet;
if (bar.dataset.key === key) return;
bar.dataset.key = key;
if (sell > 0) {
const [whole, cents] = money(sell).split('.');
priceEl.replaceChildren(document.createTextNode(whole + '.'), el('span', 'eqs-bd-cents', cents));
if (perSet) priceEl.append(el('span', 'eqs-bd-per', perSet === 'set' ? 'per set' : (typeof perSet === 'string' ? perSet : 'per set of ' + perSet)));
} else {
priceEl.replaceChildren();
}
if (ok) {
listEl.replaceChildren(document.createTextNode('List Price: '), el('s', '', money(list)));
listEl.style.visibility = '';
sav.querySelector('.eqs-bd-savings-pct').textContent = Math.round(disc) + '% off list';
sav.style.visibility = '';
} else {
listEl.replaceChildren();
listEl.style.visibility = 'hidden';
sav.style.visibility = 'hidden';
}
sav.style.display = perSet && !ok ? 'none' : '';
}
function run() {
state.runs++;
observer.disconnect();
try {
for (const card of document.querySelectorAll('.griditems ' + CARD)) {
const sku = skuOf(card);
const d = DATA[sku];
if (!d) { state.unknown.add(sku); continue; }
try {
if (card.dataset.eqsSeat !== sku || !card.querySelector('.eqs-bd-title')) {
if (!build(card, sku, d)) { state.skipped.add(sku); continue; }
} else {
const img = card.querySelector('.product-tile-image img');
const t = `translate(${d[7]}px,${d[8]}px) scale(${d[6]})`;
if (img && img.style.getPropertyValue('transform') !== t) img.style.setProperty('transform', t, 'important');
}
updatePrice(card, sku, d);
} catch (e) {
if (state.errors.length < 20) state.errors.push(sku + ': ' + e.message);
}
}
} finally {
observer.observe(document.body, { childList: true, subtree: true, characterData: true, attributes: true, attributeFilter: ['data-value', 'src'] });
}
}
// Debounced (timer-based, so it also works in background tabs)
let timer = 0, first = 0, burst = [];
function schedule() {
const now = Date.now();
if (!first) first = now;
clearTimeout(timer);
const wait = now - first > 600 ? 0 : 120;
timer = setTimeout(() => {
first = 0;
burst = burst.filter(t => now - t < 10000);
if (burst.length >= 30) return; // safety brake
burst.push(now);
run();
}, wait);
}
const observer = new MutationObserver(muts => {
for (const m of muts) {
const t = m.target.nodeType === 1 ? m.target : m.target.parentElement;
if (!t) continue;
if (t.closest?.('.eqs-bd-title,.eqs-bd-features,.eqs-bd-meta,.eqs-bd-pricebar,.eqs-bd-brandrow')) continue;
if (t.closest?.('.griditems') || [...(m.addedNodes || [])].some(n => n.nodeType === 1 && (n.matches?.(CARD) || n.querySelector?.(CARD)))) {
schedule(); return;
}
}
});
run();
const boot = setInterval(() => { if (document.querySelector('.griditems ' + CARD)) run(); }, 400);
setTimeout(() => clearInterval(boot), 8000);
window.EQS_BD = {
active: true,
version: VERSION,
rescan: run,
status: () => {
const cards = [...document.querySelectorAll('.griditems ' + CARD)];
return {
version: VERSION,
nativeCards: cards.length,
styledCards: cards.filter(c => c.classList.contains('eqs-bd')).length,
withSavings: cards.filter(c => c.querySelector('.eqs-bd-savings') && c.querySelector('.eqs-bd-savings').style.visibility !== 'hidden').length,
cartButtons: cards.filter(c => c.querySelector('.btn-add-to-cart')).length,
unknownSkus: [...state.unknown],
skipped: [...state.skipped],
errors: state.errors.slice(),
runs: state.runs
};
},
remove: () => {
observer.disconnect(); clearInterval(boot); clearTimeout(timer);
style.remove();
document.querySelectorAll('.eqs-bd').forEach(c => c.classList.remove('eqs-bd'));
delete window.EQS_BD;
console.info('[EQS SEATING] Removed. Refresh to restore the original cards.');
}
};
console.info('[EQS SEATING]', VERSION, 'installed');
})();