Ealhad
2bf4c7e682
Merge branch 'cleanup' into 'master'
...
Remove forgotten console.log()
See merge request Ealhad/peertubeify!7
2019-02-20 09:14:42 +00:00
Booteille
cb33ceb97c
Remove forgotten console.log()
2019-02-19 21:42:33 +01:00
Ealhad
0d406f1307
Publish v0.6
...
New feature: PeerTubeify now works with embed videos!
2019-02-19 13:54:09 +01:00
Ealhad
208e39ebd4
Fix bugs deleting all saved time entries use ResumeManager class
...
The first one is a stupid mistake due to the fact I was only testing with one
video at a time, so I didn't notice that the first item of the list was getting
deleted if the entry wasn't found.
The second one: I didn't like the `setInterval`, because I couldn't stop it, but
I didn't think of another solution first. Now the function calls itself with a
`setTimeout`, only when it knows the video hasn't ended yet — no infinite calls
anymore. And each time we get a new video, we `runResume()`, whith the
ResumeManager class handling the preferences.
This code can clearly be improved, but bug's fixed.
2019-02-19 13:49:42 +01:00
Ealhad
357a4a10ef
Merge branch 'invidious' into 'master'
...
Add support for Invidious redirections
Closes #6
See merge request Ealhad/peertubeify!6
2019-02-19 12:47:04 +00:00
Ealhad
bcec17a0a2
Add optional parameters object to `getPeertubeVideoURL`
...
At first I just wanted to make the isEmbed optional (default `false`), but I
thought it would be more future-proof to wrap it in an object. Now when it's not
needed, it's not there, and when it is, it's clear what it does.
2019-02-18 16:17:37 +01:00
Ealhad
104598477e
Use lodash's `contains` function instead of checking indexOf
...
Because I love not having to think what code does. Functions rule.
2019-02-18 15:38:58 +01:00
Booteille
a465394457
Use indexOf instead of strict equality to match the host
2019-02-17 20:34:14 +01:00
Booteille
c9d01c17a0
use body instead of classname, fix styling of the banner on invidious
2019-02-17 20:26:49 +01:00
Booteille
d57f95fba6
use body instead of classname, fix styling of the banner on invidious
2019-02-17 20:26:21 +01:00
Booteille
8eca34b755
Add support for Invidious
2019-02-17 20:07:50 +01:00
Booteille
9a4ebae563
Ajoute la redirection automatique des vidéos embed
2019-02-17 18:23:10 +01:00
Ealhad
8c24a4383f
Update version and dependencies
2018-11-22 16:17:33 +01:00
Ealhad
8aa3910352
Add option to resume video through multiple instances
...
Closes #3
See merge request Ealhad/peertubeify!4
2018-11-22 15:09:35 +00:00
Booteille
029de08d4d
Add option to resume video through multiple instances
2018-11-22 15:09:35 +00:00
Ealhad
f827e9b848
Refactor Peertube Automatic Redirection
...
See merge request Ealhad/peertubeify!3
2018-11-15 00:02:36 +00:00
Ealhad
25b6e7949a
Use Preferences abstraction instead of manual localStorage interaction
...
Default values and localStorage manipulation should be implemented in the
Prefereces class.
2018-11-15 00:38:41 +01:00
Ealhad
8049d4671e
Add license header to new files
2018-11-15 00:32:56 +01:00
Ealhad
66893b5015
Remove superfluous function
2018-11-15 00:29:55 +01:00
Ealhad
3c4317504e
Export functions instead of using class with only static members
...
Theres's no need to use a class all members are static and we never instantiate
it — it's not Java :D
2018-11-15 00:08:09 +01:00
Booteille
2385b5f5c8
Use type casting instead of Promise
2018-11-13 23:49:40 +01:00
Booteille
2614a3fc11
Refactor Automatic Peertube redirection to redirect before loading the page
2018-11-12 23:05:06 +01:00
Booteille
5c35ce031d
Refactor PeertubeAPI usage
2018-11-12 21:34:43 +01:00
Booteille
bf87557b84
Rename method preventYoutube to redirectYoutube
2018-11-12 20:15:06 +01:00
Ealhad
186f1d4fe2
Update README and version
2018-11-12 17:08:51 +01:00
Ealhad
3cbed317cd
Redirect before calling Youtube
...
Implements #6
2018-11-12 15:56:58 +00:00
Ealhad
82c068f8f3
Make `fetchAPI` method private
2018-11-12 15:55:09 +00:00
Ealhad
0d7312d0c2
Make some small style improvements
...
- let data = await InvidiousAPI.getVideo(id);
+ const data = await InvidiousAPI.getVideo(id);
I try to use `const` whenever I don't have to use `let`. While it's not a
guarantee as strong as what e.g. Rust can provide, I think it helps reducing
cognitive load — we know that the symbol will always reference the same piece of data.
- if (prefs.redirectYoutube === 'Auto') {
+ if (prefs.redirectYoutube == RedirectType.Auto) {
Me nitpicking again. The string value of the RedirectYoutube enum is mainly
there for the radio buttons in the options page; in the code, it's better to use
the actual RedirectType.Auto symbol.
- return {};
+ throw new Error('No results.');
Under the hood, an `async` function returns a promise, which resolves on return
and is rejected on throw.
2018-11-12 15:54:49 +01:00
Ealhad
633fa729df
Correct formatting
2018-11-12 15:24:12 +01:00
Ealhad
4cb8beaaa2
Merge branch 'cleanup' into 'master'
...
Remove unused function
See merge request Ealhad/peertubeify!2
2018-11-12 08:50:11 +00:00
Booteille
622eeed1a2
Remove unused function
2018-11-11 16:59:23 +01:00
Booteille
c676af242a
Redirect before calling Youtube
...
Add the ability to call Invidious API and use it to prevent any call to youtube servers.
Refactor some methods and move them in util.js.
2018-11-11 16:29:38 +01:00
Ealhad
4ca19de083
Update version
2018-11-09 17:09:19 +01:00
Ealhad
65cf25e0ff
Make search case-insensitive
2018-11-09 17:08:37 +01:00
Ealhad
7b4d0db96d
Update version
2018-11-09 14:44:52 +01:00
Ealhad
f4f2f9ef4a
Update version and dependencies
2018-11-09 14:40:58 +01:00
Ealhad
9c9707705f
Implement #1 : allow to redirect automatically
2018-11-09 14:40:41 +01:00
Ealhad
02005a0ef8
Add Preferences class to handle localStorage
2018-11-09 13:59:12 +01:00
Ealhad
bb34f11308
Update dependencies and version
2018-11-09 11:29:38 +01:00
Ealhad
e46c61828d
Specify thumbnail height in banner
...
It appears some videos have a *big* thumbnail, which made the banner a big mess
hiding all the page.
2018-11-04 09:14:45 +01:00
Ealhad
8602c34825
Enable webpack code splitting to drastically reduce package size
...
4x lodash was a bit too much, I think.
2018-11-04 09:06:02 +01:00
Ealhad
f197253e52
Add the possibility to display a link when on another PeerTube instance
2018-09-15 18:31:00 +02:00
Ealhad
59027cb927
Update dependencies and version
2018-08-28 23:38:24 +02:00
Ealhad
ef98bb2885
Actually search for a video with the exact same title
2018-08-28 23:26:59 +02:00
Ealhad
67beeca09d
Remove video link even if search fail (duh)
...
The bar was just staying there after having been displayed once.
2018-08-28 23:23:06 +02:00
Ealhad
8d7e24270c
Add a section in README to explain how the extension works
2018-08-28 23:15:45 +02:00
Ealhad
d396a42abf
Update version
2018-08-28 23:15:39 +02:00
Ealhad
863e33f3b9
Change default instance
...
Now using https://peertube.social thanks to Nutomic
2018-08-27 20:21:15 +02:00
Ealhad
62656b2658
Add links to browser stores
2018-08-14 12:56:56 +02:00
Ealhad
1683cc2480
Increment version
2018-08-14 12:45:21 +02:00