Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS module loading for older Androids (fixes #9311) #13899

Merged
merged 1 commit into from
Jun 22, 2023
Merged

JS module loading for older Androids (fixes #9311) #13899

merged 1 commit into from
Jun 22, 2023

Conversation

nihil-admirari
Copy link
Contributor

@nihil-admirari nihil-admirari commented May 20, 2023

Purpose / Description

JS modules must have text/javascript MIME, otherwise they won't load: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules.

Fixes

Fixes #9311.

Approach

guessMimeType() works on Android 10+. MIME type must be set explicitly on older Androids.

How Has This Been Tested?

Android 8.0 and 13.0 in emulator.

Android 8 on Samsung T585.

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@nihil-admirari
Copy link
Contributor Author

Rebased on current main, otherwise identical to #13812.

@nihil-admirari
Copy link
Contributor Author

Tested on Samsung T585; #10175 is not reproducible.

Copy link
Member

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember looking at this before in the superceded PR, I was fine with it then.
I rebased it against current main and it is clean, builds fine. LGTM, thank you and thanks for your patience!

@mikehardy mikehardy merged commit a04d9fe into ankidroid:main Jun 22, 2023
@github-actions github-actions bot added this to the 2.16 release milestone Jun 22, 2023
@nihil-admirari nihil-admirari deleted the js-modules branch June 22, 2023 20:56
@github-actions
Copy link
Contributor

Hi there @nihil-admirari! This is the OpenCollective Notice for PRs merged from 2023-06-01 through 2023-06-30

If you are interested in compensation for this work, the process with details is here:

https://github.com/ankidroid/Anki-Android/wiki/OpenCollective-Payment-Process#how-to-get-paid

We only post one comment per person per month to avoid spamming you, regardless of the number of PRs merged, but this note applies to all PRs merged for this month

Please note that GSoC contributions are okay for this process. Our philosophy is that our users have donated to AnkiDroid for all contributions. The only PRs that will not go through the OpenCollective process are ones directly related to am accepted GSoC project from a selected participant, since those receive a stipend from GSoC itself.

Please understand that our monthly budget is never guaranteed to cover all claims - the cap on payments-per-person may be lower, but we try to make our process as fair and transparent as possible, we just need your understanding.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Closet addon nonfunctional in Android versions 9 and below
2 participants