Conversation
Add CSS rules to popup.css so that long domain names are truncated with an ellipsis and the Supprimer button always remains visible. - li > span: white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0 - li > button: flex-shrink: 0 Co-authored-by: ormidales <46538211+ormidales@users.noreply.github.com>
…tions fix(popup): truncate long domain names with ellipsis in exceptions list
Co-authored-by: ormidales <46538211+ormidales@users.noreply.github.com>
…tion Fix IPv6 zone identifier validation in IPV6_REGEX
Co-authored-by: ormidales <46538211+ormidales@users.noreply.github.com>
Co-authored-by: ormidales <46538211+ormidales@users.noreply.github.com>
fix: restore keyboard focus after clearing whitelist
Co-authored-by: ormidales <46538211+ormidales@users.noreply.github.com>
Co-authored-by: ormidales <46538211+ormidales@users.noreply.github.com>
…ge-header fix: skip Accept-Language injection for non-routable/local hosts
When onHeadersReceived cannot parse the Location header URL, cancel the request unless the initial host is in the exceptions list, instead of silently allowing the redirect through. Co-authored-by: ormidales <46538211+ormidales@users.noreply.github.com>
…g-error fix(background): fail-closed on unparseable redirect Location header
There was a problem hiding this comment.
Pull request overview
Migration des changements de la branche 1.0.4 vers main, avec des ajustements de compatibilité réseau et d’accessibilité/UI pour l’extension (détection IPv6 avec zone ID, gestion d’Accept-Language, et ergonomie du popup).
Changes:
- Extension de
IPV6_REGEXpour accepter les IPv6 avec zone ID (%eth0/%25en0). - Ajout d’un filtrage “non routable/local” pour éviter de modifier
Accept-Languagesur localhost/.local et IP privées/link-local. - Améliorations UI/UX du popup : gestion du focus après vidage + style d’affichage (ellipsis) des domaines.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| utils.js | Mise à jour de la regex IPv6 pour supporter les zone identifiers. |
| background.js | Ajout d’un helper isNonRoutableHost et logique associée dans le pipeline webRequest + durcissement fail-closed sur erreurs de parsing redirect. |
| popup.js | Ajout d’une logique de focus après clearDomains pour améliorer l’accessibilité clavier. |
| popup.css | Ajustements flex/ellipsis pour éviter que les domaines débordent visuellement. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| if (IPV6_REGEX.test(h)) { | ||
| const bare = h.replace(/^\[|\]$/g, "").split("%")[0].toLowerCase(); | ||
| return bare === "::1" || bare.startsWith("fe80:") || bare.startsWith("fc") || bare.startsWith("fd"); |
There was a problem hiding this comment.
In isNonRoutableHost, the IPv6 link-local check only matches fe80::/16 via bare.startsWith("fe80:"), but link-local is fe80::/10 (covers fe80 through febf). As written, addresses like fe9f::1 would be treated as routable and have Accept-Language spoofing applied. Consider updating the predicate to cover fe8*, fe9*, fea*, feb* (e.g., regex on the first hextet) rather than only fe80:.
| return bare === "::1" || bare.startsWith("fe80:") || bare.startsWith("fc") || bare.startsWith("fd"); | |
| const firstHextet = bare.split(":")[0]; | |
| const isLoopback = bare === "::1"; | |
| let isLinkLocal = false; | |
| if (firstHextet && firstHextet.length === 4 && firstHextet.startsWith("fe")) { | |
| const hextetValue = parseInt(firstHextet, 16); | |
| if (!Number.isNaN(hextetValue) && hextetValue >= 0xfe80 && hextetValue <= 0xfebf) { | |
| isLinkLocal = true; | |
| } | |
| } | |
| const isUla = bare.startsWith("fc") || bare.startsWith("fd"); | |
| return isLoopback || isLinkLocal || isUla; |
| } | ||
|
|
||
| li > button { | ||
| flex-shrink: 0; |
There was a problem hiding this comment.
li > button { flex-shrink: 0; } interacts badly with the global button { width: 100%; }: the remove button inside list items will keep a 100% flex-basis and refuse to shrink, causing the domain <span> to collapse/ellipsis incorrectly (often disappearing). Override the list button sizing (e.g., width: auto and reset margins) or scope the global 100% width rule to only the primary action buttons.
| flex-shrink: 0; | |
| flex-shrink: 0; | |
| width: auto; | |
| margin: 0; |
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
@ormidales I've opened a new pull request, #80, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: ormidales <46538211+ormidales@users.noreply.github.com>
Fix IPv6 link-local range check (fe80::/10) and li>button layout conflict
No description provided.