docs
/
AI skills

Moderate comments and reviews

How visitors comment on posts and review products, who may post and when it shows, the spam rules (blocked words and people, links, reports, an AI assistant), the Comments inbox with approve, reject, hide, delete, pin, reply and block, what happens to star ratings, and which notices go to whom.

Comments and product reviews are the same record: a comment (comment) whose owner is the thing it is on. A comment on a product (sf_product) is a review and can carry a star rating. Anything else, such as a post or a page, gets a plain comment (appengine comments/comment-rules.ts 142). Visitors write them under a blog post (Write and publish a blog post) and on a product page (Catalog pages from products). Staff read and decide them in Comments (/comment).

"Tested" below means checked on the local engine with test posts, a test product and @test.local customers, all deleted afterwards. The rule order is also covered by the engine's own specs (comments.moderation.spec.ts, comments.verified-purchase.spec.ts, 51 passing). Everything else is read from the code, with the file named.

The rules, and where they live

Per site: site.data.comments. Set in Site Config → Comments, or Comments → Comment settings (websitemint comment/site-comment-settings.tsx). Defaults are in commentSettings (comment-rules.ts 81–98):

Studio labelFieldValues (default first)What it does
Comments on posts and pagesenabledtrue / falseOff: "Comments are turned off on this site."
Product reviewsreviewsEnabledtrue / falseOff: "Reviews are turned off for this store."
Who may commentwhoMayCommentsigned_in / anyoneanyone lets a guest post with a name and an email
When a comment showsshowWhenimmediately / after_first_approval / after_approvalSee the order below
AI assistantaiAssistantan ai_assistant name, or emptyDecides waiting comments; empty means a person does
Hold a comment with more links thanmaxLinks2More links than this: held for review
Send for review after this many reportsreportThreshold3 (at least 1)From different people
Close comments aftercloseAfterDays0 (never)Days after the post was published
Notifynotifyemail list, emptyWho is told (see Notifications)

Whole business: blocked words and people, read and written by GET / PUT comments/settings with { blockedWords, blockedWordsAction: "review" | "reject", blockedPeople }. Studio: Comments → Blocked words and people. It is saved as the comments setting (comments.service.ts 282–298).

Per record: post.allowComment: false on a post (or data.allowComment: false on any record) closes it: "Comments are closed on this post." (comment-rules.ts 153). Tested. On the store, Site Config → Storefront → Comments (site.data.storefront.showComments: false) hides the reviews block on product pages (base-app components/storefront/boutique/ProductDetail.tsx 632–637).

What happens to a new comment

In this order (decideOnCreate, comment-rules.ts 178–207):

  1. Author on the blocked list → rejected (spam). Tested.
  2. A blocked word → review, or rejected when blockedWordsAction is reject. Tested both.
  3. More links than maxLinks → review. Tested: three links were held.
  4. after_first_approval, and this person has no approved comment on the site → waits. after_approval → always waits.
  5. Otherwise approved: it shows at once. Tested.

"Waits" means new if an AI assistant is picked (the assistant then approves, rejects, hides or sends it to review), else review for a person. With immediately, a picked assistant still checks afterwards and may take it down. An edit by its author goes through the same rules again (decideOnEdit, 214–217). Tested: an edited comment stayed approved and was marked edited.

The writer sees "Thanks — your comment is waiting for approval." for a held comment, and the same words for a rejected one, so a spammer learns nothing (comments.service.ts 424–440). Tested. They also see their own waiting comment in the list, marked "Waiting for approval". Nobody else does.

Who may post, and how

The site's pages call the engine through the site's /api, with the visitor's sign-in when there is one (base-app services/activity-service.ts):

CallWhoWhat
GET comments/<datatype>/<id>?sort=newest&parent=nullanyoneApproved comments with their replies, plus approvedCount and form (open, closedMessage, mayPost: yes / sign_in / guest, reviewsWithRating, reportReasons). Visitors never see emails, reports or moderation notes (buildViews, comments.service.ts 569–629). Tested.
POST comments/<datatype>/<id> with { message, parentComment?, rating?, title?, name?, email? }signed-in customer; a guest only when whoMayComment is anyone (name and email then required)Creates it. Without sign-in on a signed_in site: 401 "Sign in to comment." Tested. Errors: "Add your email to comment.", "Write a comment first.", "Comments are closed on this post." (tested).
PUT comments/<id> { message, rating, title } / DELETE comments/<id>its author, or staffEdit, or remove (kept as deleted). Someone else: 403 "Only its author can change this comment." Tested.
POST comments/<id>/report { reason: spam / harassment / inappropriate / other, note }signed inAt reportThreshold reports from different people, an approved comment goes back to review. Tested with three.
POST stats/comment/<id>/likesigned inLikes a comment. Without sign-in: 401 "customer is required". Tested.

A review on a product the writer has a paid order for is marked verified purchase (comments.service.ts 399–403; paid means paid, confirmed, processing, shipped, delivered or completed, line 78).

Ask first

  • Which site? The rules are per site; blocked words and people are for the whole business.
  • Who may post: only signed-in customers, or anyone with an email?
  • When should comments show: at once, after a person's first is approved, or always after approval? Approved by whom: a person, or an AI assistant (which one)?
  • Who should be told about new, held and reported comments? Email addresses, or just the owners in the app.
  • For a clean-up: which comments (a tab, a post, a product, an author, a word), and what to do with them.

Steps

1. Site Config: read the rules as they are

repo_find on site by data.name, then repo_find_one by its id. Note data.comments exactly as stored (often missing: then every default above applies). Then call_appengine GET comments/settings for blocked words and people.

Hands on: the site sk, its comments block, the blocked lists. Check: open a post or product on the site as a visitor. A "Sign in to comment" link means signed_in, and a name and email box means anyone.

2. Site Config › Comments: set the rules

Write only the fields that change, with dot paths: call_appengine POST repository/update-partial/site/<sk> with, for example, { "data.comments.showWhen": "after_approval", "data.comments.notify": ["[email protected]"] }. Or use repo_update on site with patch: { "comments": { …the whole block… } }: repo_update merges one level deep, so the whole comments block is replaced, and every field must be in it.

Never send { "data": { … } } to update-partial; the site loses its name, home page and domains. Studio's Comment settings drawer saves the whole site record, so don't save it while another change to the site is being made elsewhere.

For blocked words and people: call_appengine PUT comments/settings with the whole lists ({ "blockedWords": [ … ], "blockedWordsAction": "review", "blockedPeople": [ … ] }). Fields left out keep their value. A blocked person is an email, username or customer id, in any case; an entry starting with @ (@spam.example) blocks a whole email domain (comment-rules.ts 130–138).

Stop: these rules change what visitors see and can post on the live site right away. Show the person the new rules in plain words ("only signed-in customers; every comment waits for you; owners are told"), and wait for yes.

Hands on: the saved comments block. Check: repo_find_one on the site shows it and the rest of data unchanged. On the site, the comment box matches (sign-in link, or guest fields, or "Comments are turned off on this site.").

3. Comments: read the inbox

call_appengine GET comments/moderation (staff only; tested 403 without sign-in). Query:

ParamMeaning
statustab: review (default), new (new and pending: the AI is still checking), approved, hidden, rejected, deleted, reported (reported and still live), all
datatype, ownerwhat it's on: post / sf_product, and that record's sk
sitethe site's sk
pagethe page path or URL it was written on
classificationspam, harassment, inappropriate, other, clean
qwords in the message, title, author or page title
fromwritten since (ISO date)
p, ps (max 200), s, stpaging and sort

Each row has the comment, its statusLabel and decisionLabel, on (title and link of what it's on), the author's history, and actions: the moves allowed now (comment-rules.ts 332–351). The answer also carries the count per tab. Tested. Studio: Comments (/comment), with tabs For review · New & checking · Approved · Hidden · Rejected · Deleted · Reported · All.

GET comments/single/<id> reads one comment in full, with its moderation history and reports, for staff. Anyone else gets what the public list shows: an approved comment, or their own waiting one, without the author's email, the reports or the history; any other id is 404 "Comment not found" (comments.service.ts getCommentView).

Hands on: the ids to act on, and what each one says. Check: the counts match the Studio tabs.

4. Comments: decide

call_appengine POST comments/moderate with { "ids": [ … ], "action": "<action>", "note": "<why>", "classification": "<reason>" }. The answer lists each id with ok and the new status. One failure doesn't stop the rest (comments.service.ts 991–1062). Tested:

ActionResult
approveapproved, classified clean, report count back to 0 (reports are kept)
rejectrejected; classification is harassment, inappropriate or other (default). Anything else: 400 "A reason must be one of: spam, harassment, inappropriate, other."
spamrejected as spam
hide / unhideoff the site, or back on (approved)
delete (or remove)deleted: off the site, the record kept. Studio asks for a confirm first, as it does for block_author
restoredeleted back to approved
pin / unpinpinned to the top
block_authorthe author joins the blocked people for the whole business; their next comment is rejected

Other routes, staff only:

  • Reply as the business: POST comments/<id>/reply { message }. It is approved at once, marked byBusiness, and shown under the business's name. Tested.
  • Set a status directly: POST comments/<id>/status { status, classification }. Tested.
  • Ask the AI again: POST comments/<id>/recheck. Without a picked assistant: 400 "No AI assistant is picked for this site's comments. Pick one in the site's comment settings." (tested). Held checks are retried every 15 minutes, up to 5 times (comments.jobs.ts).

Stop: every one of these changes what the public sees, or blocks a person from posting anywhere on the business's sites. A reply is published under the business's name. Show the person each comment, the action and (for a reply) the exact words, and wait for yes. For more than a few, show the list.

Hands on: each id's new status. Check: GET comments/moderation?status=<tab> no longer lists them there. As a visitor, approved ones show on the page and hidden, rejected and deleted ones don't.

5. Reviews and star ratings: what to tell the person

A review's stars are saved on the review (data.rating). They don't add up anywhere:

  • Tested: three reviews (5 stars, 9 stars, none) left the product unchanged. Neither its stats nor data.rating moved.
  • The product page's stars read data.rating and data.reviews from the product (ProductDetail.tsx 358–375). Nothing writes those, so they show no average.
  • Clicking those stars posts to crm/activity/manage, which doesn't exist (404, tested; build-studio/buttons/button-rating.tsx 65).
  • A separate POST stats/sf_product/<id>/rating { value } (signed-in customer) keeps stats.averageRating and ratingCount (appengine analytics/stats.service.ts 229–320). Tested. No page reads it.
  • Ratings aren't checked: a review of 9 stars was saved (tested). The 1–5 range is only in the schema.

If the person wants an average on the product page today, it has to be worked out and written onto the product. Use aggregate on comment where owner.id is the product, data.status is approved and data.rating is from 1 to 5. Then write update_record_partial on sf_product with { "data.rating": <average>, "data.reviews": <count> }. This is read from the code, not tested. It goes stale with the next review.

Stop: that write changes the live product page. Show the numbers, and wait for yes.

Notifications

Read from code (comments.service.ts 1348–1392; templates in tools/templates/default-email-templates.ts 391–419). Tested only for the in-app case:

WhenKindTitle
A comment shows at oncenew"New comment on " (or "New review on…")</td></tr><tr><td>A comment is held for review (on create, edit, or by the AI)</td><td><code>held</code></td><td>"A comment on <title> is waiting for approval"</td></tr><tr><td>Reports reach the threshold</td><td><code>reported</code></td><td>"A comment on <title> was reported"</td></tr></tbody></table></div><ul> <li><strong><code>notify</code> has addresses:</strong> each one gets an <strong>email</strong> (<code>comment.<kind></code>) and an in-app notice (<code>comment.<kind>-notification</code>).</li> <li><strong><code>notify</code> is empty:</strong> only an <strong>in-app</strong> notice, to every Owner and ConfigAdmin. Tested: they arrived, and no email went out.</li> <li>A rejected comment tells nobody.</li> <li><strong>The commenter is never told</strong> that their comment was approved, rejected or answered.</li> </ul> <h2 id="when-it-s-done">When it's done</h2><p>Tell the person:</p> <ul> <li>the site's rules in plain words: who may post, when comments show, who approves, links and reports limits, closing, and who is told;</li> <li>what was decided in the inbox, with counts per action;</li> <li>plainly, that review stars don't roll up to the product, and what was done about it, if anything.</li> </ul> <p>Open Comments (<code>navigate</code> to <code>/comment</code>).</p> <h2 id="what-it-can-t-do-yet">What it can't do yet</h2><ul> <li><strong>No captcha or bot check.</strong> The form sends a <code>recaptchaToken</code> and Site Config › Spam › <strong>Protect comments</strong> is saved, but neither is read (<code>comments.service.ts</code> 65–75; dbsdk <code>models/site.ts</code> 622–667). On an <code>anyone</code> site, a guest is just an email typed into a box. Nothing proves it, so a guest can post as someone else's email, and inherit that person's "already approved" standing under <code>after_first_approval</code>.</li> <li><strong>Star ratings don't roll up</strong>, the product page stars don't save, and ratings outside 1–5 are accepted (step 5).</li> <li><strong>No notice to the commenter</strong>, about approval, rejection or a reply.</li> <li><strong>Business replies show the business's name</strong>, not the staff member's.</li> <li><strong><code>allowRating</code> on a post does nothing</strong>; only product comments carry stars.</li> <li><strong>Delete is soft.</strong> <code>delete</code> keeps the record as <code>deleted</code>. Deleting it for good is a repository delete (<code>delete_record</code> on <code>comment</code>), which skips the moderation history.</li> </ul> <h2 id="don-ts">Don'ts</h2><ul> <li>Don't approve, reject, hide, delete, block or reply without a yes on each comment, or on a list the person has seen.</li> <li>Don't send a reply in the business's name with words the person hasn't approved.</li> <li>Don't tell the person <strong>Protect comments</strong> turns on a captcha. It doesn't.</li> <li>Don't tell them the product shows an average rating from its reviews. It doesn't.</li> <li>Don't write <code>blockedWords</code> or <code>blockedPeople</code> as a partial list: the list you send replaces the old one.</li> <li>Don't send <code>{ "data": { … } }</code> to <code>update-partial</code> on the site.</li> <li>Don't test with real customers. Use <code>@test.local</code>, and delete them after.</li> </ul> </article> <nav class="pager"> <a class="pg pg-p" href="../ai-skills/write-and-publish-a-blog-post.html"><span>Previous</span><b>Write and publish a blog post</b></a> <a class="pg pg-n" href="../ai-skills/customer-account-portal.html"><span>Next</span><b>The customer account portal (My Account)</b></a> </nav> </main> <nav class="toc" id="toc"></nav> </div> <script>/* Docs search. Loaded inline into every page by build.mjs. The index (search-index.js) is fetched with a <script> tag on first use, so this also works from disk. search.html?q=... renders the full result list. */ (function () { var q = document.getElementById('q'); if (!q) return; var ROOT = q.getAttribute('data-root') || ''; var wrap = q.parentNode; var pop = document.createElement('div'); pop.className = 'sr-pop'; pop.hidden = true; wrap.appendChild(pop); var list = document.getElementById('sr'); var idx = null, waiting = null, active = -1, hits = []; function load(cb) { if (idx) return cb(); if (waiting) { waiting.push(cb); return; } waiting = [cb]; var s = document.createElement('script'); s.src = ROOT + '/search-index.js'; s.onload = function () { var d = window.DOCS_SEARCH; idx = { pages: d.pages.map(function (p) { return { u: p[0], t: p[1], s: p[2], d: p[3], lt: p[1].toLowerCase(), ls: p[2].toLowerCase() }; }), secs: d.secs.map(function (x) { return { p: x[0], a: x[1], h: x[2], x: x[3], lh: x[2].toLowerCase(), lx: x[3].toLowerCase() }; }) }; var w = waiting; waiting = null; w.forEach(function (f) { f(); }); }; s.onerror = function () { waiting = null; pop.innerHTML = '<div class="sr-empty">Search index not found. Rebuild the docs.</div>'; pop.hidden = false; }; document.head.appendChild(s); } /* Filler words ("how do I refund a card") are dropped unless nothing else is left. */ var STOP = ' a an the to of in on for and or is are how do does i my me we our you your with by at it be can what where when why which this that from as into '; function terms(s) { var all = (s.toLowerCase().match(/[a-z0-9]+/g) || []).filter(function (t, i, a) { return a.indexOf(t) === i; }); var real = all.filter(function (t) { return STOP.indexOf(' ' + t + ' ') === -1; }); return real.length ? real : all; } function count(hay, t) { var n = 0, i = hay.indexOf(t); while (i !== -1 && n < 8) { n++; i = hay.indexOf(t, i + t.length); } return n; } function wordStart(hay, t) { var i = hay.indexOf(t); while (i !== -1) { if (i === 0 || !/[a-z0-9]/.test(hay[i - 1])) return true; i = hay.indexOf(t, i + 1); } return false; } /* Every term must appear somewhere in the section or its page title. Title and heading hits outweigh body hits; whole-word hits outweigh fragments. */ function search(query) { var ts = terms(query); if (!ts.length) return []; var phrase = ts.join(' '); var byPage = {}; idx.secs.forEach(function (s) { var p = idx.pages[s.p], score = 0; for (var i = 0; i < ts.length; i++) { var t = ts[i], hit = 0; if (p.lt.indexOf(t) !== -1) hit += wordStart(p.lt, t) ? 10 : 4; if (s.lh.indexOf(t) !== -1) hit += wordStart(s.lh, t) ? 7 : 3; var c = count(s.lx, t); if (c) hit += (wordStart(s.lx, t) ? 1.5 : 0.6) + Math.min(c, 8) * 0.25; if (p.ls.indexOf(t) !== -1) hit += 0.5; if (!hit) return; score += hit; } if (ts.length > 1) { if (p.lt.indexOf(phrase) !== -1) score += 12; if (s.lh.indexOf(phrase) !== -1) score += 9; else if (s.lx.indexOf(phrase) !== -1) score += 4; } if (!s.a) score += 0.5; var g = byPage[s.p] || (byPage[s.p] = { p: p, score: 0, secs: [] }); g.secs.push({ s: s, score: score }); if (score > g.score) g.score = score; }); var groups = Object.keys(byPage).map(function (k) { return byPage[k]; }); groups.forEach(function (g) { g.secs.sort(function (a, b) { return b.score - a.score; }); g.score += Math.min(g.secs.length - 1, 5) * 0.4; }); groups.sort(function (a, b) { return b.score - a.score; }); return groups.map(function (g) { g.ts = ts; return g; }); } function esc(s) { return s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"'); } function mark(s, ts) { if (!ts.length) return esc(s); return s.split(new RegExp('(' + ts.join('|') + ')', 'gi')).map(function (part, i) { return i % 2 ? '<mark>' + esc(part) + '</mark>' : esc(part); }).join(''); } function snippet(text, ts, len) { var lx = text.toLowerCase(), pos = -1; for (var i = 0; i < ts.length; i++) { var j = lx.indexOf(ts[i]); if (j !== -1 && (pos === -1 || j < pos)) pos = j; } if (pos === -1) return mark(text.slice(0, len), ts) + (text.length > len ? '…' : ''); var start = Math.max(0, pos - 50); var sp = text.lastIndexOf(' ', start); if (start > 0 && sp > start - 20) start = sp + 1; var s = text.slice(start, start + len); return (start > 0 ? '…' : '') + mark(s, ts) + (start + len < text.length ? '…' : ''); } function href(p, a) { return ROOT + '/' + p.u + '.html' + (a ? '#' + a : ''); } function moreHref(v) { return ROOT + '/search.html?q=' + encodeURIComponent(v); } function renderPop() { var v = q.value.trim(); if (!v) { pop.hidden = true; return; } hits = search(v); active = hits.length ? 0 : -1; if (!hits.length) { pop.innerHTML = '<div class="sr-empty">No results for “' + esc(v) + '”.</div>'; } else { pop.innerHTML = hits.slice(0, 8).map(function (g, i) { var s = g.secs[0].s; return '<a class="sr-i' + (i === 0 ? ' on' : '') + '" href="' + href(g.p, s.a) + '">' + '<span class="sr-t">' + mark(g.p.t, g.ts) + (s.h ? ' <span class="sr-h">› ' + mark(s.h, g.ts) + '</span>' : '') + '</span>' + (g.p.s ? '<span class="sr-s">' + esc(g.p.s) + '</span>' : '') + '<span class="sr-x">' + snippet(s.x || g.p.d, g.ts, 160) + '</span></a>'; }).join('') + '<a class="sr-more" href="' + moreHref(v) + '">See all ' + hits.length + ' result' + (hits.length === 1 ? '' : 's') + ' →</a>'; } if (!list) { // Phones: the popup is position:fixed to the screen edges, just under the box. pop.style.top = window.innerWidth <= 900 ? (wrap.getBoundingClientRect().bottom + 8) + 'px' : ''; pop.hidden = false; } } function renderList() { var v = q.value.trim(); if (!v) { list.innerHTML = '<p class="sr-count">Type in the search box to search every page.</p>'; return; } var gs = search(v); list.innerHTML = '<p class="sr-count">' + gs.length + ' page' + (gs.length === 1 ? '' : 's') + ' match “' + esc(v) + '”.</p>' + gs.slice(0, 60).map(function (g) { var top = g.secs[0].s, rest = g.secs.slice(1, 5).filter(function (x) { return x.s.a; }); return '<div class="sr-g"><a href="' + href(g.p, top.a) + '">' + mark(g.p.t, g.ts) + (top.h ? ' › ' + mark(top.h, g.ts) : '') + '</a>' + (g.p.s ? '<span class="sr-s">' + esc(g.p.s) + '</span>' : '') + '<p>' + snippet(top.x || g.p.d, g.ts, 260) + '</p>' + (rest.length ? '<ul class="sr-sub">' + rest.map(function (x) { return '<li><a href="' + href(g.p, x.s.a) + '">' + mark(x.s.h, g.ts) + '</a></li>'; }).join('') + '</ul>' : '') + '</div>'; }).join(''); } function update() { load(function () { if (list) { renderList(); var u = q.value.trim() ? '?q=' + encodeURIComponent(q.value.trim()) : location.pathname.split('/').pop(); try { history.replaceState(null, '', u); } catch (e) {} } else renderPop(); }); } function setActive(i) { var items = pop.querySelectorAll('.sr-i'); if (!items.length) return; active = (i + items.length) % items.length; items.forEach(function (el, k) { el.classList.toggle('on', k === active); }); items[active].scrollIntoView({ block: 'nearest' }); } q.addEventListener('focus', function () { load(function () { if (!list && q.value.trim()) renderPop(); }); }); q.addEventListener('input', update); q.addEventListener('keydown', function (e) { if (e.key === 'ArrowDown') { e.preventDefault(); setActive(active + 1); } else if (e.key === 'ArrowUp') { e.preventDefault(); setActive(active - 1); } else if (e.key === 'Escape') { pop.hidden = true; q.blur(); } else if (e.key === 'Enter') { e.preventDefault(); var v = q.value.trim(); if (!v || list) return; var items = pop.querySelectorAll('.sr-i'); location.href = active >= 0 && items[active] ? items[active].getAttribute('href') : moreHref(v); } }); document.addEventListener('click', function (e) { if (!wrap.contains(e.target)) pop.hidden = true; }); document.addEventListener('keydown', function (e) { var tag = (document.activeElement && document.activeElement.tagName) || ''; var typing = /INPUT|TEXTAREA|SELECT/.test(tag) || (document.activeElement && document.activeElement.isContentEditable); if ((e.key === 'k' && (e.metaKey || e.ctrlKey)) || (e.key === '/' && !typing)) { e.preventDefault(); q.focus(); q.select(); } }); if (list) { var m = /[?&]q=([^&]*)/.exec(location.search); q.value = m ? decodeURIComponent(m[1].replace(/\+/g, ' ')) : ''; update(); if (!q.value) q.focus(); } })(); var mb=document.getElementById('menu'); if(mb){mb.addEventListener('click',function(){document.getElementById('side').classList.toggle('closed');});} if(window.innerWidth<=900){var s=document.getElementById('side'); if(s)s.classList.add('closed');} var art=document.querySelector('.body'), toc=document.getElementById('toc'); if(art&&toc){ var hs=art.querySelectorAll('h2,h3'); if(hs.length>1){ var html='<h4>On this page</h4>'; hs.forEach(function(h,i){ if(!h.id){h.id='s'+i+'-'+h.textContent.toLowerCase().replace(/[^a-z0-9]+/g,'-').replace(/^-|-$/g,'');} html+='<a class="'+h.tagName.toLowerCase()+'" href="#'+h.id+'">'+h.textContent+'</a>'; }); toc.innerHTML=html; var links=toc.querySelectorAll('a'); var obs=new IntersectionObserver(function(es){ es.forEach(function(e){ if(e.isIntersecting){ links.forEach(function(l){l.classList.toggle('on', l.getAttribute('href')==='#'+e.target.id);}); }}); },{rootMargin:'-110px 0px -70% 0px'}); hs.forEach(function(h){obs.observe(h);}); } } </script> </body> </html>