Commit graph

31 commits

Author SHA1 Message Date
kodxana
972f5e7415
Update ytContent.tsx 2021-08-28 22:00:01 +02:00
kodxana
014ad21fd6
Update tabOnUpdated.ts 2021-08-28 21:59:18 +02:00
kodxana
9532d45b15
Update settings.ts 2021-08-28 21:58:10 +02:00
kodxana
11334c7689
Update yt.ts 2021-08-28 21:56:57 +02:00
kodxana
e2f46d2d08
Update manifest.json 2021-08-28 21:56:20 +02:00
kodxana
d23fda84d5
Update manifest.json 2021-08-28 21:56:06 +02:00
Kevin Raoofi
94af57b809 Fix CORS errors in content script
Move fetch requests to background page. Include a dirty cache so that
same requests don't get made over and over again as settings change.
2021-04-20 23:22:19 -04:00
kodxana
0ea63c60b1
Update manifest.json 2021-01-21 23:19:15 +01:00
Kevin Raoofi
410a87710b Fix redirect
The odysee button change came with passing around the secondary part of
the URL instead of the whole thing. Unfortunately, this change requires
functions to be a little smarter and resolve with the domain lookup.

This was missed for redirects.
2021-01-21 17:01:35 -05:00
Kevin Raoofi
c5c8f40ddf Add WoL logos
* Adds the new Watch on LBRY logos
* Use logo relative to repo for README

They were added into a new folder to make a distinction between
external and Watch on LBRY icons.

 adasd
2020-12-29 12:17:32 -05:00
Kevin Raoofi
76830c907e Odysee logo support
This change includes a settings object which describes how the button
should be displayed keyed by the redirect setting.
2020-12-29 09:54:28 -05:00
kodxana
40a3a7fee0
UP version 2020-12-04 20:40:20 +01:00
Kevin Raoofi
4d3a6d6e97 Use the README file for page directions
Add marked dependency for parcel so that it can do that for us
2020-11-25 18:34:59 -05:00
Kevin Raoofi
7e049858b5 Updated styling 2020-11-25 18:25:37 -05:00
Kevin Raoofi
8341291497 Use a set to deduplicate subscriptions 2020-11-25 18:25:37 -05:00
Kevin Raoofi
bd5adf6652 Support YouTube takeout JSON 2020-11-11 14:21:34 -05:00
Kevin Raoofi
08842c4ba8 Added SVG icon to button 2020-10-28 05:21:49 -04:00
Kevin Raoofi
2e58a04333 Update button on redirect change 2020-10-28 05:21:49 -04:00
Kevin Raoofi
7954c29482 Watch-on-Lbry button
* Created a content script for YouTube that injects a styled button
* Automatically pause the video when redirecting to the app

The button location is rather finicky as certain polymer components
seem to move around, causing random DOM elements to appear all over the
place if it's not a "singleton" component.

squash
2020-10-28 05:21:49 -04:00
Kevin Raoofi
40036013c2 Set font-family to sans serif
FireFox defaults to serif for non-button elements. This makes the look
of the buttons consistent on both firefox and chrome based browsers.
2020-10-28 05:21:49 -04:00
Kevin Raoofi
f198929922 Disable mininification + import changes
Import changes should reduce the size of the bundle a little.
Particularly, not getting the entirety of lodash.
2020-10-28 05:21:49 -04:00
kodxana
df18a83285
Up Version 2020-10-13 15:23:50 +02:00
Kevin Raoofi
deac83e656 Bug fixes
Subscription converter didn't handle error responses very well.
Also, the chunk size was lowered to 300 as this seems to make requests
failing.

Additionally, fix bug where redirect was trying to go to the app and a frontend at the same time, only to confuse lbry.tv
2020-10-13 06:45:51 -04:00
Kevin Raoofi
3821ff8e1f Add odysee 2020-10-13 05:39:52 -04:00
Kevin Raoofi
69f24a6f32 Make YTtoLBRY use Preact
Not particularly valuable here, but more consistent if we're to accept
popup as using preact
2020-10-13 05:39:52 -04:00
Kevin Raoofi
6e907c91e8 Use preact + sass for popup
* Styles were extracted out from popup.css and into common/style
* Preact allows for reusable components and easier dynamic components
  * Easy transition to react or others while not being overbearing
* Component specific style are locally imported and handled by parcel

ButtonRadio is particulary nice in that it uses pre-exisitng button
styling on radio buttons to make it easy to pick configurable options.
2020-10-13 05:39:52 -04:00
Kevin Raoofi
9f8e521fa6 URL parsing for app redirects
URL parsing logic is basically a straight port of how lbryio/lbry-sdk
parses lbry URLs. While there's a lot more going on, it should be
easier to follow what they're doing this way.

Also, added some light unit tests for the URL parsing using jest.
Which, of course, needed a babel config.

With this, tabOnUpdated was able to be rewritten more elegantly to
handle redirects as it delegates a lot of the work to utilities now.
2020-10-13 05:39:47 -04:00
Kevin Raoofi
da5cc12a7b ytService and rewrite of YTtoLBRY
YTtoLBRY:

* Use DOMParser for reading OPML
  * OPML parsing was quite brittle as it relied on string parsing
* Removed dead script inclusion in the HTML page
* Removed global state variables
* Use fetch to clean up the query logic
* Promisified file, API calls, and settings querying to simplify logic

Many of the utilities involving APIs were isolated to a common module.
Particularly, ytService contains all methods for extracting IDs,
querying for the lbry URLs, parsing OPML, and more.

This functionally is heavily used in YTtoLBRY and lightly used by
tabsOnUpdated.
2020-10-13 05:17:44 -04:00
Kevin Raoofi
48f88da6aa Common settings module
* settings module as single source of truth and provides utilities,
  defaults, constants, and typing
* runtimeOnStartup and storageOnChanged were merged into storageSetup
* storageSetup reworked to use settings for seamless additions
* tabOnUpdated and YTtoLBRY updated to use settings for URL prefixes
2020-10-13 05:17:44 -04:00
Kevin Raoofi
4a8fcab524 Remove content.js script include
Since that scripts doesn't exist, it breaks the parcel build
2020-10-06 14:59:23 -04:00
Kevin Raoofi
0cc8f4effe npm style project setup
* All files were moved to the `src` directory, unchanged
* Parcel handles module resolution as well as transpilation via babel
* package.json, package-lock.json, and .gitignore were added
* Utilize crossplatform tools for build
2020-10-06 14:58:52 -04:00