PageSourceSearch

https://servomold.com/_nuxt/chunks/SeoChecker.DGB_sD-p.js

js servomold.com collected 2026-10-06 16:51:42 UTC 8,286 bytes, 1 lines download raw bytes

1import{_ as e}from"./CollapseWrapper.DEECHxus.js";import{u as t,s}from"../entry.-UsSL6wf.js";import{e as l,w as a,f as r,a as n,o as i,b as o,Q as c,A as u,a1 as h,n as d,F as x,P as g,c as v,O as m,a0 as p,X as y}from"./vue-vendor.CVQgAUSY.js";import"./icons.CVgwGPIL.js";import"./reka-ui-vendor.BGpdC8Pt.js";import"./dayjs-vendor.JXe9Dxlf.js";const k={key:0},f={class:"mt-1 text-xs text-gray-300"},w={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",class:"size-5","stroke-width":"1.75"},b={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",class:"size-5","stroke-width":"1.75"},C={key:0,class:"flex items-center justify-center py-4"},j={class:"flex gap-2"},A={class:"mt-2 space-y-2"},M={key:0,class:"mt-1 text-xs text-gray-300"},I={key:0,class:"mt-1 text-xs text-gray-300"},S={class:"flex items-center gap-2"},L={class:"mt-2 space-y-2"},_={key:0,class:"text-xs text-red-500"},q={key:1,class:"text-xs text-red-500"},H={key:2,class:"text-xs text-gray-300"},z={key:3,class:"space-y-1"},N=["onClick"],P={class:"text-gray-500"},$={class:"truncate"},O={key:0,class:"ml-auto text-xs text-red-500 italic"},W={class:"flex items-center gap-2"},B={class:"mt-2"},Q={key:0},T={class:"mt-1 space-y-1"},U=["onClick"],D={key:1,class:"px-1"},E={class:"flex items-center gap-2"},F={class:"mt-2 space-y-2"},V={key:0},X={class:"mt-1 space-y-1"},G=["onClick"],J={key:1},K={class:"mt-1 space-y-1"},R=["onClick"],Y={key:1,class:"mb-2 flex items-center justify-center"},Z={__name:"SeoChecker",setup(Z){const ee=l(!0),te=l(!0),se=l(0),le=["🚀","🎯","🌟","🎨","🎪"],ae=l(""),re=l(""),ne=l(""),ie=l(""),oe=l([]),ce=l([]),ue=l([]),he=l([]),de=l(!1),xe=l(!1),ge=l(!1),ve=l(!1),me=l(!1),pe=l(!0),ye=e=>{e.scrollIntoView({behavior:"smooth",block:"center"}),e.classList.add("highlight-temp"),setTimeout(()=>e.classList.remove("highlight-temp"),2e3)},ke=()=>{te.value=!0,ae.value=document.title||"Untitled Page";const e=document.querySelector("title");re.value=e?.textContent.trim()||"",de.value=!!re.value;const t=document.querySelector('meta[name="description"]');ne.value=t?.getAttribute("content")?.trim()||"",xe.value=!!ne.value;const s=document.querySelectorAll("h1");ge.value=1===s.length,ie.value=s[0]?.textContent.trim()||"",oe.value=Array.from(document.querySelectorAll("h1, h2, h3, h4, h5, h6")).map(e=>({element:e,tag:e.tagName.toLowerCase(),content:e.textContent.trim(),level:parseInt(e.tagName.slice(1)),hierarchyIssue:null})),pe.value=(e=>{if(e.length<=1)return!0;let t=0;for(const s of e){const e=s.level;if(0===t&&1!==e)return s.hierarchyIssue="Should start with H1",!1;if(e>t+1)return s.hierarchyIssue=`H${t} followed by H${e} - skipped level`,!1;t=e}return!0})(oe.value);const l=document.querySelectorAll("img");me.value=l.length>0,ce.value=Array.from(l).filter(e=>!e.getAttribute("alt")?.trim()),ve.value=l.length&&0===ce.value.length;const a=document.querySelectorAll("a");ue.value=Array.from(a).filter(e=>!e.textContent.trim()||e.textContent.trim()===e.href),he.value=Array.from(a).filter(e=>!e.getAttribute("title")?.trim()),te.value=!1},fe=()=>{se.value>=le.length-1?se.value=0:se.value++};return a(()=>t().path,ke),r(()=>{ke();new MutationObserver(ke).observe(document.body,{childList:!0,subtree:!0}),s(fe,1e3)}),(t,s)=>{const l=e;return i(),n("div",{class:d(["fixed bottom-14 left-2 z-50 max-h-[80vh] overflow-y-auto rounded-lg bg-black text-sm text-white",u(ee)?"w-14 p-2":"w-80 p-4"])},[o("div",{class:d(["flex items-start",u(ee)?"justify-center":"mb-4 justify-between border-b border-gray-700 pb-2"])},[u(ee)?c("",!0):(i(),n("div",k,[s[1]||(s[1]=o("div",{class:"font-bold"},"SEO & Accessibility Checker",-1)),o("div",f,' Page: "'+h(u(ae))+'" ',1)])),o("button",{class:"mb-2 rounded p-1 hover:bg-gray-800",onClick:s[0]||(s[0]=e=>ee.value=!u(ee))},[u(ee)?(i(),n("svg",w,[...s[2]||(s[2]=[o("path",{d:"M7 8h-3a1 1 0 0 0 -1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-3"},null,-1),o("path",{d:"M14 16h-4v-8h4"},null,-1),o("path",{d:"M11 12h2"},null,-1),o("path",{d:"M17 8m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"},null,-1)])])):(i(),n("svg",b,[...s[3]||(s[3]=[o("path",{d:"M3 16m0 1a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-3a1 1 0 0 1 -1 -1z"},null,-1),o("path",{d:"M4 12v-6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-6"},null,-1),o("path",{d:"M15 13h-4v-4"},null,-1),o("path",{d:"M11 13l5 -5"},null,-1)])]))])],2),u(te)?(i(),n("div",C,[...s[4]||(s[4]=[o("div",{class:"h-4 w-4 animate-spin rounded-full border-2 border-gray-300 border-t-white"},null,-1)])])):(i(),n(x,{key:1},[u(ee)?(i(),n("div",Y,[o("span",{class:d([u(de)&&u(xe)&&u(ge)&&u(ve)&&0===u(ue).length&&0===u(he).length&&u(pe)?"text-green-500":"text-red-500","emoji-rotate"])},h(u(de)&&u(xe)&&u(ge)&&u(ve)&&0===u(ue).length&&0===u(he).length&&u(pe)?le[u(se)]:"❌"),3)])):(i(),n(x,{key:0},[g(l,null,{title:m(()=>[o("div",j,[s[5]||(s[5]=o("span",null,"Meta Information",-1)),o("span",{class:d(u(de)&&u(xe)?"text-green-500":"text-red-500")},h(u(de)&&u(xe)?"✅":"❌"),3)])]),content:m(()=>[o("div",A,[o("div",{class:d({"text-red-500":!u(de),"text-green-500":u(de)})},[p(" Meta Title: "+h(u(de)?"✅":"❌")+" ",1),u(re)?(i(),n("div",M,' "'+h(u(re))+'" ',1)):c("",!0)],2),o("div",{class:d({"text-red-500":!u(xe),"text-green-500":u(xe)})},[p(" Meta Description: "+h(u(xe)?"✅":"❌")+" ",1),u(ne)?(i(),n("div",I,' "'+h(u(ne))+'" ',1)):c("",!0)],2)])]),_:1}),g(l,null,{title:m(()=>[o("div",S,[s[6]||(s[6]=o("span",null,"Headlines",-1)),o("span",{class:d([u(ge)&&u(pe)?"text-green-500":"text-red-500"])},h(u(ge)&&u(pe)?"✅":"❌"),3)])]),content:m(()=>[o("div",L,[u(ge)?c("",!0):(i(),n("div",_," Warning: Page should have exactly one H1 tag ")),u(pe)?c("",!0):(i(),n("div",q," Warning: Headlines are not in correct hierarchical order ")),0===u(oe).length?(i(),n("div",H," No headlines found on the page ")):(i(),n("ul",z,[(i(!0),n(x,null,y(u(oe),(e,t)=>(i(),n("li",{key:t,class:d(["flex cursor-pointer items-center gap-2 text-xs hover:text-white",[e.hierarchyIssue?"text-red-500":"text-gray-300",{"text-red-500":"h1"===e.tag&&!u(ge)}]]),onClick:t=>ye(e.element)},[o("span",P,h(e.tag),1),s[7]||(s[7]=o("span",{class:"text-gray-500"},"•",-1)),o("span",$,h(e.content),1),e.hierarchyIssue?(i(),n("span",O,h(e.hierarchyIssue),1)):c("",!0)],10,N))),128))]))])]),_:1}),u(me)?(i(),v(l,{key:0},{title:m(()=>[o("div",W,[s[8]||(s[8]=o("span",null,"Images with Alt",-1)),o("span",{class:d(u(ve)?"text-green-500":"text-red-500")},h(u(ve)?"✅":`❌ (${u(ce).length})`),3)])]),content:m(()=>[o("div",B,[u(ce).length>0?(i(),n("div",Q,[s[10]||(s[10]=o("div",{class:"text-xs text-gray-300"}," Images missing alt: ",-1)),o("ul",T,[(i(!0),n(x,null,y(u(ce),(e,t)=>(i(),n("li",{key:t,class:"flex cursor-pointer items-center gap-2 text-xs text-gray-300 hover:text-white",onClick:t=>ye(e)},[s[9]||(s[9]=o("span",{class:"text-red-500"},"•",-1)),p(" "+h(e.src.split("/").pop()||"Unknown image"),1)],8,U))),128))])])):c("",!0)])]),_:1})):(i(),n("div",D,"No images found on the page")),g(l,null,{title:m(()=>[o("div",E,[s[11]||(s[11]=o("span",null,"Links",-1)),o("span",{class:d(0===u(ue).length&&0===u(he).length?"text-green-500":"text-red-500")},h(0===u(ue).length&&0===u(he).length?"✅":`❌ (${u(ue).length+u(he).length})`),3)])]),content:m(()=>[o("div",F,[u(ue).length>0?(i(),n("div",V,[s[13]||(s[13]=o("div",{class:"text-xs text-gray-300"}," Links without anchor text: ",-1)),o("ul",X,[(i(!0),n(x,null,y(u(ue),(e,t)=>(i(),n("li",{key:t,class:"flex cursor-pointer items-center gap-2 text-xs text-gray-300 hover:text-white",onClick:t=>ye(e)},[s[12]||(s[12]=o("span",{class:"text-red-500"},"•",-1)),p(" "+h(e.href),1)],8,G))),128))])])):c("",!0),u(he).length>0?(i(),n("div",J,[s[15]||(s[15]=o("div",{class:"text-xs text-gray-300"}," Links without title attribute: ",-1)),o("ul",K,[(i(!0),n(x,null,y(u(he),(e,t)=>(i(),n("li",{key:t,class:"flex cursor-pointer items-center gap-2 text-xs text-gray-300 hover:text-white",onClick:t=>ye(e)},[s[14]||(s[14]=o("span",{class:"text-red-500"},"•",-1)),p(" "+h(e.href),1)],8,R))),128))])])):c("",!0)])]),_:1})],64))],64))],2)}}};export{Z as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.