Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Remove the Bowser browser detection (Internet Explorer 8 warning)

Aperta Adatta ai principianti
#453 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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

Impact: Low Level: Easy Type: Enhancement Value: Coders Value: Security

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.

  1. Delete system/bowser/ and system/core/bowser.php.
  2. Remove the system/bowser line from the static file shortcuts in index.php.
  3. Remove the translation keys used only by the popup (browser, not-supported) from system/languages/en.php and nl.php, if no other code uses them.
  4. If a browser check is still wanted, a few lines of feature detection suffice. For example, warn when fetch or classList is 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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PlanBCode/hypha

Tutte le issue di PlanBCode/hypha

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.