Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Remove the Bowser browser detection (Internet Explorer 8 warning)

オープン 初心者向け
#453 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript
領域
frontend

調査の方向性

まず、system/core/bowser.php が loadBowser() をどのように登録し、index.php が system/bowser/ をどのように配信するかを追跡します。system/languages/en.php と nl.php にあるポップアップの翻訳キーがほかで使われているか調べます。Bowser とその登録、配信ルート、未使用の翻訳を削除します。IE の警告と Bowser のアセットがなくなり、削除したキーやライブラリへの参照が残っていなければ完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
JavaScript
スター
5
フォーク
9
平均マージ
18時間 7分
マージ済み PR(30日)
11

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PlanBCode/hypha のほかの issue

PlanBCode/hypha の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。