Remove the Bowser browser detection (Internet Explorer 8 warning)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Refactoring
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript
- Ambito
- frontend
Direzione di ricerca
Inizia ricostruendo come system/core/bowser.php registra loadBowser() e come index.php serve system/bowser/; verifica se le chiavi di traduzione del popup in system/languages/en.php e nl.php sono usate altrove. Rimuovi Bowser, la sua registrazione, la route di servizio e le traduzioni inutilizzate. Il lavoro è terminato quando l’avviso di IE e gli asset di Bowser sono stati rimossi e non rimangono riferimenti alle chiavi eliminate o alla libreria.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Hypha bundles Bowser 1.x, a browser-detection library. It is used for one thing only: warning visitors who use Internet Explorer 8 or older. Those browsers have been out of use for years, so the library no longer serves a purpose.
Yet every visitor downloads it on every page. It is also outdated third-party JavaScript that has to be tracked and audited. Removing it means one request less per page and one bundled library less.
This was split off from #437 (outdated bundled JavaScript), so that it can be handled on its own; it does not depend on the jQuery or WYMeditor work there.
Affected code (dev 5dae13a; the same files are on master)
| File | What |
|---|---|
system/bowser/bowser.min.js |
Bowser 1.x. There is no version string in the file; the 2015 copyright and the bowser.check() API belong to the 1.x line. |
system/core/bowser.php |
Registers loadBowser() as a post-processing function. It links bowser.min.js into every page and adds an inline script that shows a "browser not supported" popup when bowser.name === 'msie' and the version is below 9. |
index.php |
Serves the files under system/bowser/ (serveFile($hyphaQuery, 'system/bowser')). |
Impact
No known vulnerability in Bowser 1.x. The cost is unnecessary JavaScript on every page, and an outdated library that security scanners flag. Severity: Low.
Suggested fix
Note: this is a suggestion and a starting point, not a finished fix. Please review it and adapt it as you see fit.
- Delete
system/bowser/andsystem/core/bowser.php. - Remove the
system/bowserline from the static file shortcuts inindex.php. - Remove the translation keys used only by the popup (
browser,not-supported) fromsystem/languages/en.phpandnl.php, if no other code uses them. - If a browser check is still wanted, a few lines of feature detection suffice. For example, warn when
fetchorclassListis missing, without a library.
Related: #437, #96.
- Lingua principale
- JavaScript
- Stelle
- 5
- Fork
- 9
- Merge medio
- 18h 7m
- PR unite (30g)
- 11
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PlanBCode/hypha
-
Impact: Medium Level: Easy Type: Bug Value: Users
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Impact: Low Level: Easy Pagetype: Festival Type: Bug Value: Coders
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Impact: Medium Level: Easy Pagetype: Mailinglist Type: Bug Value: Users
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
Impact: Low Level: Easy Type: Bug Value: Coders
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
PlanBCode/hypha#586 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Impact: Medium Level: Easy Type: Bug Usecase: De Stadsbron Value: Visitors
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
PlanBCode/hypha#522 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di PlanBCode/hypha
Issue simili
-
[Bug] Dashboard renders attachment links that resolve to 404 when the FILES binding is absentApertabug 優先: 低
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
admission-deferred priority: medium status: ready work-class: scoped
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
melodic-software/claude-code-plugins#10887 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 91/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 2 giorni