Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

Commit

Permalink
Fix news source on homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwibrowser authored Oct 8, 2020
1 parent fd5b0fa commit e64e65b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions chrome/browser/resources/local_ntp/local_ntp.html
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,21 @@ <h2>Private mode</h2>
if (child.childNodes[1].innerText)
source = child.childNodes[1].innerText;
}
if (child.childNodes.length == 3) {
if (child.childNodes[0].tagName == 'SOURCE' && child.childNodes[1].tagName == 'SOURCE' && child.childNodes[2].tagName == 'A') {
source_logo = child.childNodes[0].src;
if (child.childNodes[2].innerText)
source = child.childNodes[2].innerText;
}
}
if (child.childNodes.length == 4) {
if (child.childNodes[0].tagName == 'SOURCE' && child.childNodes[1].tagName == 'SOURCE'
&& child.childNodes[2].tagName == 'SOURCE' && child.childNodes[3].tagName == 'A') {
source_logo = child.childNodes[0].src;
if (child.childNodes[3].innerText)
source = child.childNodes[3].innerText;
}
}
} else if (child.childNodes.length == 1 && child.childNodes[0].tagName == 'A')
{
subNode = child.childNodes[0];
Expand Down

0 comments on commit e64e65b

Please sign in to comment.