A browser extension that sets the quality of YouTube videos according to the user's preference, based on the video's
FPS.
Available for:
- Google Chrome
- Mozilla Firefox
- Microsoft Edge
- Opera
- Safari - maintained by carlosjeurissen
Made by avi12.
Due to the way the browsers handle extensions, when an extension receives an update, content scripts in already-open web
pages cannot use the Storage API,
until the user reloads those web pages.
In the context of this extension, it means that when the extension receives an update, as long as the user doesn't
reload YouTube web pages, the extension cannot get the data regarding the user-preferred qualities.
To provide a smooth user experience, instead of forcing the user to reload all of the already-open web pages, I decided to keep track of the last qualities that were fetched, and use them.
This solution is not perfect, since if the user wants to update the quality of the videos in the currently-open web
pages using the popup page (as seen above), it will not update dynamically.
However, this is the only viable solution, since the alternative one would be to auto-reload web pages, which would lead
to a bad user experience.
You can translate the extension to your own language by
filling this form.
After filling, you will get an email, which will grant you access to a spreadsheet, in which you can contribute your
translations.
pnpm i
pnpm dev
pnpm run-chromium
pnpm run-edge-windows
- Build the extension for Firefox/Opera (see below).
- Open the extensions page in that browser.
- Enable the developer mode (top-right corner usually).
- Either drag-drop the browser-compatible ZIP onto the browser or click "Load unpacked extension" and choose it.
- Install Android Studio on your operating system
- Create an AVD (Android Virtual Device)
- If you're creating a phone emulator, choose one that has Play Store preinstalled
- If you're creating a tablet emulator, after creating, follow these steps to have Play Store preinstalled
- Download Kiwi browser. I recommend creating a Google account specifically to be used with the emulator
- Run
pnpm run pack
- Push the ZIP to the emulator. If using PowerShell:
$zip = "youtube_auto_hd_fps_{version}.zip"; # where {version} is the version number of the extension $destAndroid = "storage/emulated/Download/$zip"; adb shell rm $destAndroid; adb push "dist_packed/$zip" $destAndroid;
- If you're running both emulators, use argument
-s ID
to specify the ID of the emulator you want to interact with
E.g.adb -s ID shell ...
- Find out the IDs using
adb devices
- If you're running both emulators, use argument
- Select the ZIP in the Download folder
- To reload, you must first remove the extension, re-run
pnpm run pack
, and then load the ZIP again
emulator @DEVICE_NAME
pnpm build-pack
pnpm build-for-firefox
pnpm build-for-opera
Feel free to contribute! Keep in mind that the license I chose
is GPL v3.
If you want to fork, make sure to credit avi12 and link to this repository.