Skip to content

Conversation

@absidue
Copy link
Member

@absidue absidue commented Sep 18, 2022


Replace jquery getJSON and get with native fetch

Pull Request Type

  • Feature Implementation

Related issue
Original giant PR #2360

Description
This PR replaces the calls to jquery's networking functions (getJSON and get) with the fetch API that is available in all browsers these days. It doesn't remove the jquery dependency as it's still used in quite a few other places in FreeTube, I'll change those in future PRs.

The idea is to split up my giant jquery PR into smaller more manageable ones, as that makes them easier to test and less likely that bugs sneak into them.

Testing (for code that is not small enough to be easily understandable)

  1. Update check
    Set version in the package.json file to 0.16.0 and check that the "Update available..." banner shows up
  2. Proxy test
    Click the proxy test button, if you have a proxy it will succeed. If you don't have a proxy you can check that the error handling works by looking in the devtools console
  3. Switch to the Invidious API and just check that stuff still works
  4. Enable SponsorBlock
    Video with segments: https://youtu.be/nFDBxBUfE74
    Video without segments: https://youtu.be/0bvZ70wgZVM
  5. Enable captions on a video and see if they show up

Desktop (please complete the following information):

  • OS: Windows
  • OS Version: 10
  • FreeTube version: 0.17.1

@absidue absidue added the PR: waiting for review For PRs that are complete, tested, and ready for review label Sep 18, 2022
@PrestonN PrestonN enabled auto-merge (squash) September 18, 2022 13:30
@PrestonN PrestonN merged commit 061a7c8 into FreeTubeApp:development Sep 21, 2022
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Sep 21, 2022
@absidue absidue deleted the replace-jquery-ajax branch September 21, 2022 07:22
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.

5 participants