Open Bug 1651292 Opened 6 years ago Updated 7 months ago

www.jp.square-enix.com does not load in Firefox

Categories

(Web Compatibility :: Site Reports, task, P2)

Unspecified
Android

Tracking

(Webcompat Priority:P3, Webcompat Score:1)

REOPENED
Webcompat Priority P3
Webcompat Score 1

People

(Reporter: karlcow, Assigned: karlcow)

References

()

Details

(Keywords: webcompat:needs-contact, webcompat:site-report, webcompat:sitepatch-applied)

User Story

platform:android
impact:site-broken
configuration:general
affects:all
branch:release
user-impact-score:0

Attachments

(1 file)

There is user agent sniffing in this script which prevents to load the page at all.
But probably the override should happen only for the URI of this script.

https://www.jp.square-enix.com/music/sem/page/FF7R/ost/assets/js/main.js?v6

  preloadStart: function () {
    if (!sound.isPreloading) {
      sound.assetsDir = app.BASE_URL + sound.ASSETS_DIR,
      sound.isPreloading = !0,
      sound.preloadList = [
      ],
      sound.preloadCount = 0,
      window.AudioContext = window.AudioContext || window.webkitAudioContext;
      var e = navigator.userAgent;
      e.indexOf('Android') > 0 && e.match(/Chrome\/([\d]+)/).slice(1) >= 66 && (window.AudioContext = null),
      window.AudioContext ? (sound.context = new AudioContext, sound.previewContext = new AudioContext, sound.preloadList.length > 0 ? sound.getAudioBuffer()  : sound.checkPreload())  : sound.getLegacyAudio(),
      utils.getPageVisibillityEnabled() ? document.addEventListener('visibilitychange', function () {
        sound.documentHidden = document.hidden,
        sound.visibilityChangeHandler()
      }, !1)  : (window.onpagehide = function () {
        sound.documentHidden = !0,
        sound.visibilityChangeHandler()
      }, window.onpageshow = function () {
        sound.documentHidden = !1,
        sound.visibilityChangeHandler()
      })
    }
  },

faulty line is

      e.indexOf('Android') > 0 && e.match(/Chrome\/([\d]+)/).slice(1) >= 66 && (window.AudioContext = null),

see https://github.com/webcompat/web-bugs/issues/53018
it fails with Uncaught TypeError: can't access property "slice", e.match(...) is null

This user agent string is working.

Mozilla/5.0 (Android 10; Mobile; rv:79.0) Gecko/79.0 Firefox/79.0 Chrome/69
Priority: -- → P1
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED

Reopening this one, since we're now tracking the status of webcompat issues with interventions differently.

Status: RESOLVED → VERIFIED
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Summary: Create intervention for www.jp.square-enix.com → www.jp.square-enix.com does not load in Firefox
Severity: -- → S2
User Story: (updated)
Webcompat Priority: --- → P2
Webcompat Score: --- → 7
Component: Interventions → Site Reports
Priority: P1 → P2
Webcompat Score: 7 → 4
Webcompat Score: 4 → 3
Webcompat Score: 3 → 1
User Story: (updated)
Webcompat Priority: P2 → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: