Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Translation updated for:
- Japanese ([@kons10](https://github.com/kons10))
- Arabic ([@heshamoomar](https://github.com/heshamoomar))

### Improved
- Improved favicon loading reliability by switching to modern Google favicon endpoint.
- Enhanced offline icon display logic for shortcuts.

## [v3.3](https://github.com/prem-k-r/MaterialYouNewTab/compare/v3.2...v3.3) - Nov 23, 2025

Expand Down
12 changes: 9 additions & 3 deletions scripts/shortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,15 @@ document.addEventListener("DOMContentLoaded", function () {
return preset.svg;
}

// Fetch favicon from Google
return `<img src="https://s2.googleusercontent.com/s2/favicons?domain_url=https://${hostname}&sz=256"
onerror="this.src='./svgs/offline.svg'" alt="">`;
const faviconUrl = `https://unavatar.io/${hostname}?fallback=false`;

return `
<img src="${faviconUrl}"
alt=""
class="favicon-img"
onerror="this.src='./svgs/offline.svg'; this.onerror=null;"
>
`;
}

// Attaches event listeners to shortcut input fields
Expand Down