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

Commit e64e65b

Browse files
authored
Fix news source on homepage
1 parent fd5b0fa commit e64e65b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

chrome/browser/resources/local_ntp/local_ntp.html

+15
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,21 @@ <h2>Private mode</h2>
444444
if (child.childNodes[1].innerText)
445445
source = child.childNodes[1].innerText;
446446
}
447+
if (child.childNodes.length == 3) {
448+
if (child.childNodes[0].tagName == 'SOURCE' && child.childNodes[1].tagName == 'SOURCE' && child.childNodes[2].tagName == 'A') {
449+
source_logo = child.childNodes[0].src;
450+
if (child.childNodes[2].innerText)
451+
source = child.childNodes[2].innerText;
452+
}
453+
}
454+
if (child.childNodes.length == 4) {
455+
if (child.childNodes[0].tagName == 'SOURCE' && child.childNodes[1].tagName == 'SOURCE'
456+
&& child.childNodes[2].tagName == 'SOURCE' && child.childNodes[3].tagName == 'A') {
457+
source_logo = child.childNodes[0].src;
458+
if (child.childNodes[3].innerText)
459+
source = child.childNodes[3].innerText;
460+
}
461+
}
447462
} else if (child.childNodes.length == 1 && child.childNodes[0].tagName == 'A')
448463
{
449464
subNode = child.childNodes[0];

0 commit comments

Comments
 (0)