Commit Graph

47 Commits

Author SHA1 Message Date
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
Ealhad 7877257edd Add polyfill to run on chromium browsers 2018-08-14 12:43:26 +02:00
Ealhad 462eded1ae Add icons to manifest 2018-08-14 12:42:49 +02:00
Ealhad 8c9fde4139 Add logo 2018-08-14 11:21:42 +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 2140d179be Add basic Makefile to ease packaging 2018-08-11 23:47:10 +02:00
Ealhad f9cfbcd451 Bump version to 0.2.1 2018-08-11 00:34:47 +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
Ealhad c54f8260fe Launch content script only on video pages 2018-08-10 11:52:43 +02:00
Ealhad ffc24c25be Fix copyright notice 2018-08-10 11:22:42 +02:00
Ealhad fc2cbd2532 Initial commit 2018-08-10 02:15:35 +02:00