netdeals.js: the first ask after a boot waits for the hub once (shared copy, Network Weekend 2026-11-17)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-17 07:31:34 -06:00
parent 18e9c5d56a
commit fadcfaa7bf
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -26,7 +26,7 @@
var mine = (ev.deals || []).filter(function (d) { return d.site === me && t < Date.parse(d.endsAt || ev.endsAt); })[0];
var line = mine ? ((mine.byDay && mine.byDay[day]) || mine.text) : '';
var label = (ev.days && ev.days[day]) || '';
var onDealsPage = ev.url && (location.origin + location.pathname) === ev.url;
var onDealsPage = !!ev.url && (function () { try { var u = new URL(ev.url); return location.pathname === u.pathname && (location.hostname === u.hostname || me === 'iap'); } catch (e) { return false; } })();
remove();
bar = document.createElement('div');
bar.className = 'nw-ribbon'; bar.setAttribute('role', 'region'); bar.setAttribute('aria-label', ev.name);