/* domucgiare - SEO bo sung cho mayinlongbien.vn (11/10/2026) 1) Sua alt anh banner trong menu (truoc day trung voi tieu de trang) 2) Them schema BreadcrumbList tu thanh dieu huong (ol.breadcrumb) 3) Them schema Article cho bai viet (/tu-van/, /tin-tuc/ ...) Muon sua: tai file, sua, tai len TEN MOI (v2) va doi duong dan trong Quang cao > "Code chan trang + toi uu CLS (domucgiare)". */ (function(){ function txt(e){return e?e.textContent.replace(/\s+/g," ").trim():"";} function addLd(o){var s=document.createElement("script");s.type="application/ld+json";s.text=JSON.stringify(o);document.head.appendChild(s);} function hasType(t){var ss=document.querySelectorAll('script[type="application/ld+json"]');for(var i=0;i< ss.length;i++){if(ss[i].text.indexOf('"'+t+'"')>-1)return true;}return false;} try{ var imgs=document.querySelectorAll("ul.dropdown-menu li.auto_dropdown img"); for(var i=0;i< imgs.length;i++){var li=imgs[i].closest("li.auto_dropdown");var a=li&&(li.querySelector(":scope > a")||li.querySelector("a"));var t=txt(a);if(t){imgs[i].alt=t+" – Thần Vũ";}} }catch(e){} var crumbs=[]; try{ var ol=document.querySelector("ol.breadcrumb"); if(ol){var lis=ol.querySelectorAll("li");for(var j=0;j< lis.length;j++){var an=lis[j].querySelector("a");var name=txt(lis[j]);if(!name)continue;var url=an&&an.href?an.href:location.href.split("#")[0];crumbs.push({"@type":"ListItem","position":crumbs.length+1,"name":name,"item":url});} if(crumbs.length>1&&!hasType("BreadcrumbList")){addLd({"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":crumbs});}} }catch(e){} try{ var p=location.pathname; if(/\.html$/.test(p)&&/^\/(tu-van|tin-tuc|kien-thuc)/.test(p)&&!hasType("Article")&&!hasType("BlogPosting")){ var h1=txt(document.querySelector("h1"));var og=document.querySelector('meta[property="og:image"]');var md=document.querySelector('meta[name="description"]');var can=document.querySelector('link[rel="canonical"]'); var art={"@context":"https://schema.org","@type":"Article","headline":(document.title.split(" | ")[0]||h1).slice(0,110),"mainEntityOfPage":can?can.href:location.href,"author":{"@type":"Organization","name":"Máy In Mực In Thần Vũ","url":"https://mayinlongbien.vn/"},"publisher":{"@type":"Organization","name":"Máy In Mực In Thần Vũ","logo":{"@type":"ImageObject","url":"https://mayinlongbien.vn/img/logo.png"}}}; if(og&&og.content)art.image=[og.content];if(md&&md.content)art.description=md.content; addLd(art); } }catch(e){} })();