covidterns / youtube-deleted-videos

A repo for the project that determines which of your YouTube playlist's videos were deleted.
8 stars 6 forks source link

Initial Browser Extension #3

Closed RayRCaringal closed 4 years ago

RayRCaringal commented 4 years ago

So okay someone said they were gonna make a pull request, and I'm gonna get a bit busy so I'll leave this issue here for reference to make sure all the features are there for anyone who wants to look over the PR.

  1. Make sure that you're using videoIDs, if you don't feel like it I already have the code so you can just send in the PRs. But we want it like this. image

  2. Don't forget to configure the manifest.json properly. Again if you're unsure you can just send in the PR and we can fix it. For example, we would probably want popup actions, not browser actions.

  3. Ensure cross-platform compatibility. Read up on this, https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Build_a_cross_browser_extension

  4. The extension should work if you're in the playlist page, for example, https://www.youtube.com/playlist?list=PLYT4vq6pQVSvfGdP3MdKZegD8Ub_0pqPS, or if you're in a video within the playlist https://www.youtube.com/watch?v=WrHDquZ-tj0&list=PLYT4vq6pQVSvfGdP3MdKZegD8Ub_0pqPS&index=2&t=0s

You may use RegEx or whatever means necessary to accomplish this, this RegEx was previously posted in the chat so I shall also provide it here /(((watch\?v=)[^ ]{11}&)|(playlist\?))list=[^ ]+/

Also as a reminder videoIDs and playlistIDs can be found within the URLs. YouTube's videoID's are unique, titles can be repeated, positions can be changed. These must be considered when taking account of edge cases.

RayRCaringal commented 4 years ago

Bit of an update on number 4, we can implement that later. I might make that a separate issue in the future as there could be a problem with accessing localStorage across multiple pages.