Skip to content

Commit

Permalink
fix(all): fix description
Browse files Browse the repository at this point in the history
  • Loading branch information
Hunam6 committed Jun 8, 2021
1 parent ef1e805 commit a724a19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pages/all.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@
<a class="link-title" href="{{firstResult.link}}">{{firstResult.title}}</a>
<br />
<a class="link" href="{{firstResult.link}}">{{firstResult.shownLink}}</a>
<p class="link-text">{{firstResult.desc}}
<p class="link-text">{{{firstResult.desc}}}
</p>
<div class="sub-results">
{{#firstResults}}
<article>
<a class="link-title" href="{{link}}">{{title}}</a>
<p class="link-text">{{desc}}</p>
<p class="link-text">{{{desc}}}</p>
</article>
{{/firstResults}}
</div>
Expand All @@ -109,7 +109,7 @@
<a class="link-title" href="{{link}}">{{title}}</a>
<br />
<a class="link" href="{{link}}">{{shownLink}}</a>
<p class="link-text">{{desc}}</p>
<p class="link-text">{{{desc}}}</p>
</article>
{{/results}}
</main>
Expand Down
2 changes: 1 addition & 1 deletion src/all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const all = async (doc: Document, lang: string) => {

//Results
doc.querySelectorAll('.LC20lb.DKV0Md').forEach((el, i) => (data.results[i] = {title: el.textContent})) //results title
doc.querySelectorAll('.aCOpRe').forEach((el, i) => (data.results[i].desc = el.textContent)) //results description
doc.querySelectorAll('.IsZvec').forEach((el, i) => (data.results[i].desc = el.children[0].innerHTML)) //results description
doc.querySelectorAll('.TbwUpd.NJjxre').forEach((el, i) => (data.results[i].shownLink = el.textContent)) //results shown link
doc.querySelectorAll('.yuRUbf').forEach((el, i) => (data.results[i].link = el.children[0].getAttribute('href')!)) //results link
if (!noFirstResult) data.firstResult = data.results.shift() //first result
Expand Down

0 comments on commit a724a19

Please sign in to comment.