1
0
mirror of https://gitlab.com/Cha_deL/peertubeify synced 2024-12-22 12:54:06 +01:00
Commit Graph

22 Commits

Author SHA1 Message Date
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
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
65cf25e0ff Make search case-insensitive 2018-11-09 17:08:37 +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
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
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
863e33f3b9 Change default instance
Now using https://peertube.social thanks to Nutomic
2018-08-27 20:21:15 +02:00
Ealhad
7877257edd Add polyfill to run on chromium browsers 2018-08-14 12:43:26 +02:00
Ealhad
3cb749e8b3 Add missing license notice 2018-08-13 20:04:24 +02:00
Ealhad
a806ba0d4b Go all TypeScript 2018-08-13 20:03:42 +02:00
Ealhad
66f9b3a391 Add options page 2018-08-11 23:48:55 +02:00
Ealhad
62800befd4 Display link in a bottom banner rather than in the page flow 2018-08-11 00:29:24 +02:00
Ealhad
d2e9d13634 Remove loose colon 2018-08-10 18:55:58 +02:00
Ealhad
7d97eb5885 v0.2: use webpack, and DOM mutations to properly handle YT navigation 2018-08-10 15:45:07 +02:00