コミットグラフ

728 コミット

作成者 SHA1 メッセージ 日付
meow a402128a7d Move `_helpers.js` include from various .ecr's into `template.ecr` `head` tag 2022-06-05 21:19:59 +03:00
Émilien Devos 4ae77bcef9
Remove rating display from the frontend 2022-06-04 15:39:04 +02:00
Émilien Devos e84416e56d
Remove dislikes icon (#3092) 2022-06-04 12:58:34 +02:00
meow 1097648f0a Fix HTML validation. This is how browser really split tags 2022-05-17 10:09:01 +03:00
meow 7dd699370f js code rewrite. Created _helpers.js with XHR and storage wrapper 2022-05-06 04:46:59 +03:00
Samantaz Fox f5fb4c6c64
Apply 2859.diff 2022-05-01 21:10:43 +02:00
Émilien Devos 595c3fb833
Revert "Youtube verification badge" (#3070) 2022-04-30 23:42:38 +02:00
Samantaz Fox 1d25c55c0b
Merge pull request #2859 from jonas-w/verified-badge
Youtube verification badge
2022-04-30 18:54:38 +02:00
Émilien Devos 2ea986326d
Bump videojs to 7.12.1 (#3011) 2022-04-22 22:37:45 +02:00
Samantaz Fox 84b6429ca6
Fix error due to templating engine change 2022-04-16 22:48:24 +02:00
Samantaz Fox 62d7abdd9e
Add a user friendly message for when no results are found 2022-04-08 22:28:43 +02:00
Samantaz Fox d93a7b315d
Make use of Search::Query/Filters and associated HTML generator 2022-04-03 22:27:52 +02:00
Jonas Wunderlich ec3e67e0d2 Wait that was too much replacing 2022-03-26 20:18:24 +01:00
Jonas Wunderlich 611e7e9dd8 Changed icon to checkmark and for verified author to checkmark-circle 2022-03-26 20:13:33 +01:00
Jonas Wunderlich aa09bbe23d Done some refactoring 2022-03-13 20:16:30 +01:00
Jonas 6de449811d
Merge branch 'iv-org:master' into verified-badge 2022-02-25 19:29:12 +01:00
Samantaz Fox 575b039170
Merge pull request #2922 from SamantazFox/download-widget-fix
Download widget fix
2022-02-24 22:53:06 +01:00
Samantaz Fox 6082887070
Add missing '_label' suffix to translation identifier 2022-02-23 16:43:59 +01:00
Samantaz Fox 8da336b7aa
Move the "watch history" checkbox under the "user" section 2022-02-23 16:42:34 +01:00
Le Jester 897f871f99
Make the history recording optional. 2022-02-23 13:03:21 +01:00
Samantaz Fox fe057c7873
Make a function that builds the download widget's HTML 2022-02-22 17:42:41 +01:00
Samantaz Fox 85ba04b715
Merge pull request #2871 from SamantazFox/user-code-cleaning
User code cleaning & fixing
2022-02-14 15:38:05 +01:00
Samantaz Fox 4f4b19a962
embed page: fix typo in videojs-overlay script URL 2022-02-08 02:41:08 +01:00
Samantaz Fox 99d770be64
Move user pages (ECR files) to subfolder 2022-02-07 17:39:15 +01:00
Samantaz Fox c04f45d5e3
Move user struct to own file, under Invidious namespace 2022-02-07 17:15:22 +01:00
Samantaz Fox 6a75fa08dc
Merge pull request #2492 from mastihios/patch-input-html-escape
Change <input value="..."> encoding to HTML.escape
2022-02-07 16:53:43 +01:00
jonas-w f8b29674b2 Gave them marks some space and added nil checks 2022-02-07 02:25:34 +01:00
jonas-w 9205ccc124 Removed dummy values and added checks for items.ecr 2022-02-07 02:00:43 +01:00
jonas-w 00df3e2c40 Refactored code and added badges to Search but many dummies because of the way components/item works 2022-02-04 19:59:07 +01:00
jonas-w a2578ac6b4 Added Verified Badge to related videos 2022-02-04 17:55:22 +01:00
jonas-w 1fee636afa Added verification badge to video player and error with related_videos 2022-02-03 23:18:50 +01:00
jonas-w c584e31657 Inlined the if statement 2022-02-03 22:14:00 +01:00
jonas-w 66340281e6 Added verification badge for channel view 2022-02-03 21:42:28 +01:00
Samantaz Fox ba37259258
Also propagate changes to watch ECR page 2022-02-03 04:24:31 +01:00
mastihios cb0f7bf6b0
Change <input value="..."> encoding to HTML.escape 2022-02-03 01:47:18 +01:00
Samantaz Fox fc5f84a0cd
Merge pull request #2827 from SamantazFox/more-code-cleanup
More code cleanup
2022-02-02 00:36:19 +01:00
Samantaz Fox eba311baa9
Merge pull request #2397 from syeopite/dep-manager-for-videojs-stuff
Add dependency manager script for videojs stuff
2022-01-28 15:30:13 +01:00
Samantaz Fox 84cc732281
search functions: Don't return result count
This is useless, as the items count can be directly acessed
using the '.size' method, so use that instead when needed.
2022-01-28 02:22:36 +01:00
Samantaz Fox 6cf6c56dd1
Autofocus search bar only on search homepage 2022-01-13 22:19:19 +01:00
Samantaz Fox 37c953e633
i18n: Use plurals for tokens/replies/unseen notifications 2022-01-10 22:49:07 +01:00
Samantaz Fox 5bb2cb7d71
i18n: Use plurals for video/view/subscriber/subscription counts 2022-01-10 22:49:07 +01:00
Samantaz Fox 3bb7fbb2f1
Merge pull request #2719 from SamantazFox/batch-minor-fixes
Multiple minor fixes
2022-01-05 17:20:57 +01:00
Samantaz Fox 6c8a5a1e7f
Fix leading spaces being collapsed in descriptions
Fixes #1954
2022-01-05 03:32:54 +01:00
Samantaz Fox 1769b0fdce
Fix "video can't be added to playlist without JS"
Fixes #2686
2022-01-05 03:32:54 +01:00
Samantaz Fox 68cbc11810
Fix the search box
Fix #277 : autoselect search field
Fix #1107: no spell checking/auto-correct on search field
2022-01-05 03:32:44 +01:00
Samantaz Fox 85cf27119c
Move DB queries related to playlists in a separate module (3/3) 2022-01-04 17:15:43 +01:00
Samantaz Fox 46d08237c6
Move DB queries related to playlists in a separate module (2/3) 2022-01-04 17:13:52 +01:00
Samantaz Fox 28a6589a1e
Merge pull request #2538 from bbielsa/player-remember-position
Retain video time position in video player
2021-12-21 22:05:43 +01:00
Samantaz Fox ddb06b0cac
Fix XSS vulnerability in channel playlists
The channel/<ucid>/playlists page was vulnerable to Cross Site Scripting
(XSS), because the different URL parameters were inserted as-is in the URL
meant for instance switching.

This vulnerability could allow an attacker to inject malicious Javascript
in the page by tricking the user to click on a crafted link.

Bug introduced in commit 66e7285108
("Only use /redirect when automatically redirecting").

Thanks to Jack (@testa:cthd.icu on Matrix, @cysea on github) for responsibly
reporting this issue!
2021-12-19 20:51:44 +01:00
bbielsa f31bd5ffb9 Use localization for save player position label in the preferences page 2021-12-15 19:38:56 +01:00
bbielsa 5abe7fe123 Rename 'remember_position' to 'save_player_pos' for clarity 2021-12-15 19:37:55 +01:00
bbielsa a6a0bbf398 Add remember_position field to the Preferences and VideoPreferences structs, and add a checkbox in the preferences page to toggle it 2021-12-15 19:37:55 +01:00
Samantaz Fox f29ab53aff
Add other missing translations
* on watch page and video cards (search results, playlists, etc...)
* on /feed/playlists
* in search filters (not normalized in order to avoid collisions with
an existing PR that reworks the search filters)
2021-11-21 01:54:46 +01:00
Samantaz Fox b5b0c58de7
Add missing translation for quality selectors 2021-11-21 01:50:11 +01:00
Samantaz Fox a1bb421eec
Remove useless 'hl' parameters on captions URL 2021-11-21 01:50:11 +01:00
Samantaz Fox 139786b9ef
i18n: pass only the ISO code string to 'translate()'
Don't use the whole Hash everywhere.
Also fall back nicely to english string if no translation exists.
2021-11-21 01:50:11 +01:00
Samantaz Fox 301444563b
i18n: Use language full name instead of ISO code
Fixes #851
2021-11-21 01:50:11 +01:00
babababag fd54cf2d05
Escape video description 2021-11-17 12:04:30 +00:00
syeopite 437bdedb07
Use env.request.resource for instance switch link 2021-10-26 16:12:25 -07:00
syeopite a531f4f057
Rebase error 2021-10-26 16:12:25 -07:00
syeopite 66e7285108
Only use /redirect when automatically redirecting 2021-10-26 16:12:16 -07:00
Samantaz Fox 2b81a82620
Merge pull request #2529 from DmitrySandalov/master
Feature Request: Localization for trending iv-org#331
2021-10-26 23:49:56 +02:00
Samantaz Fox b555df8377
Merge pull request #2428 from syeopite/ameba-fixes
Fix (some) issues detected by Ameba
2021-10-26 23:34:18 +02:00
Samantaz Fox 232730e909
Merge branch 'master' into master 2021-10-26 23:31:48 +02:00
Samantaz Fox 1e0712625a
Normalize translation key for preferences categories
categories normalized:
 - Miscellanous
 - Player
 - Visual
 - Administrator
 - Data
 - Subscription
2021-10-26 23:17:04 +02:00
Samantaz Fox 88752f32bd
Normalize translation key for user prefrerences
preferences normalized:
 - annotations
 - annotations_subscribed
 - automatic_instance_redirect
 - autoplay
 - captions
 - comments
 - continue
 - continue_autoplay
 - dark_mode
 - default_home
 - extend_desc
 - feed_menu
 - listen
 - local
 - locale
 - max_results
 - notifications_only
 - player_style
 - quality
 - quality_dash
 - related_videos
 - show_nick
 - sort
 - speed
 - thin_mode
 - unseen_only
 - video_loop
 - volume
 - vr_mode
2021-10-26 23:15:39 +02:00
syeopite 35d15c7c2b
Fix Style/VariableNames issues 2021-10-25 01:12:26 -07:00
Dmitry Sandalov 1d78d67af3
Feature Request: Localization for trending (move TRENDING_REGIONS to i18n.cr as CONTENT_REGIONS) 2021-10-21 22:30:49 +03:00
Dmitry Sandalov d9c58c4837
Feature Request: Localization for trending iv-org#331 2021-10-21 14:54:15 +03:00
syeopite 5f65e92500
Merge pull request #2508 from syeopite/lazy-load-images
Lazy load (some) images
2021-10-17 18:25:59 +00:00
TheFrenchGhosty 22e8f7e287 Fix #2510 2021-10-14 21:00:14 +02:00
TheFrenchGhosty 0ad2793b68 Link to invidious.io/donate/ in the footer 2021-10-14 20:20:25 +02:00
syeopite 585e4617e8
Lazy load (some) images 2021-10-14 08:18:44 -07:00
diogo 7eba7fbcc7
add index to playlist item 2021-10-11 23:30:49 +02:00
mastihios 0947c26612
Fix URL-encoding in href strings (#2460)
* hrefs: replace HTML.escape w/ URI.encode_www_form

* Fix search_query_encoded
2021-10-11 05:18:20 -07:00
Samantaz Fox adc12addfa
Add config option to display source code URL in footer (#2450) 2021-10-07 13:53:12 +02:00
Samantaz Fox d806310665
Revert "Fix typo (#2456)" (#2457)
This reverts commit 4982bff74d.
2021-10-04 19:51:57 +02:00
Jorge Maldonado Ventura 4982bff74d
Fix typo (#2456) 2021-10-04 17:47:57 +00:00
syeopite 9c44e41a4c
Merge pull request #2228 from syeopite/extract-items-overhaul
Overhaul extract_item(s) functions and add infrastructure for parsing YouTube categories
2021-10-02 20:00:16 +00:00
mastihios 7b2aa5f98e
add icon-buttons to playlist items (#2442) 2021-10-02 11:59:33 +00:00
syeopite a50f64f6e9
Add parser for categories (shelfRenderer)
This commit adds a new parser for YT's shelfRenderers which are
typically used to denote different categories.The code for featured
channels parsing has also been moved to use the new parser but some
additional refactoring are needed there.

The ContinuationExtractor has also been improved and is now capable of
extraction continuation data that is packaged under
"appendContinuationItemsAction"

In additional this commit adds some useful helper functions to extract
the current selected tab the continuation token. This is to mainly
reduce code size and repetition.
--
This cherry-picked commit also removes the code for parsing featured
channels present on the original.

(cherry picked from commit 8000d538dbbf1eb9c78e000b1449926ba3b24da9)
2021-09-24 21:07:06 -07:00
syeopite 86ca568d6d
Remove login type button from frontend (#2423) 2021-09-23 08:44:26 +02:00
syeopite 02431b3f98
Use correct videojs-vtt-thumbnails location in licences.ecr 2021-09-18 13:30:17 -07:00
syeopite 0323202a03
Revert to iv-org fork of silvermine-videojs-quality-selector
Upstream requires at least two additional sources. Whereas Invidious needs it to be
able to display a single additional source for normal (dashless)
qualites. Aka medium and hd720.
2021-09-18 13:30:17 -07:00
syeopite 62c1991b88
Typo 2021-09-18 13:30:17 -07:00
syeopite 3a6085ad31
Readd player.css 2021-09-18 13:30:17 -07:00
syeopite 2451497b31
Typo 2021-09-18 13:30:17 -07:00
syeopite 262131f68e
Add script to resolve and fetch VideoJS files 2021-09-18 13:30:15 -07:00
syeopite 5054510d15
Prevent VR from being initialized in listen mode (#2396) 2021-09-15 01:37:23 +02:00
Samantaz Fox 947fe4fbb3
HTML escape video mimetype
Video mimetype may contain code information between double quotes.
If not properly escaped, it breaks the browser's parser. E.g:
```
type="video/mp4; codecs=" avc1.64001f,="" mp4a.40.2""=""
```

Thank Robin for catching this!
2021-09-13 18:20:11 +02:00
syeopite 50c8afb525
Handle equirectangular projections for VR (#2379) 2021-09-10 07:42:39 +00:00
Émilien Devos 8b62c05fe2
remove 3gp only from the player (#2376)
+ video quality precedence on default player when js is not enabled
2021-09-03 09:39:11 +02:00
TheFrenchGhosty 8e3ff79f22 Remove the mention of 'Omar Roth' from the footer 2021-09-01 12:23:50 +02:00
syeopite 5005212bec
Extract feed routes (#2269)
* Extract feed routes from invidious.cr
* Removes the deprecated route for /feed/top
* Deprecate /view_all_playlist & use /feed/playlists
* Move feed views into their own directory

* Add haltf method to halt current route context
* Change status_code + return blocks to use haltf

* Set appropriate response headers for RSS routes
2021-08-30 16:58:24 +02:00
Samantaz Fox 56ebef4352
Multiple front-end fixes (#2247)
Fixes:
* Sanitize user-provided content in HTML (Fixes #2193)
* Fix encoding of search query in prev/next pages (Fixes #2229)
* Fix some issues introduced with #2196:
   - Fix alignment of all <h3> elements (Move the inline style from the parent to the <h3> element)
   - Add missing comma on 'dir' HTML attribute (Typo introduced by PR #2196)

Code cleaning:
* Remove unnecessary 'each_sclice' + 'each' double loop in ECR files
* Clean the player's <source> list generation code (in player.ecr)
2021-07-15 23:01:36 +02:00
syeopite 3e5c353298
Merge pull request #2205 from syeopite/fix-age-restricted-videos
Partial (and temporary) fix for age restricted videos
2021-07-14 10:11:03 -07:00
syeopite 54b19a04bb
Fix caption parsing on age restricted videos 2021-06-27 08:35:28 -07:00
Samantaz Fox cfcb64c516
Fix layout of video 'card' items
Previous changes broke alignment of text and icons
2021-06-25 20:47:15 +02:00
Samantaz Fox eecfc155b8
Right-align the RSS icon in channel playlists 2021-06-25 02:15:49 +02:00
Samantaz Fox 9cef7945c0
Fix RTL text in video titles on Firefox
The behavior was as follow: on Right-To-Left text (e.g Arabic) that is wrapped
(because it's too long to fit on one line), the second row and following rows
may or may not be right aligned (as RTL text should be). Opening the devtools
fixes that alignement, as consistently as closing the devtool breaks it.

This problem seems to arrive only in the following configurations (link nested
in a paragraph, both of which may or may not have the dir= attribute):

* `<p><a href="some_link">RTL_TEXT</a></p>`
* `<p><a href="some_link" dir="auto">RTL_TEXT</a></p>`
* `<p dir="auto"><a href="some_link">RTL_TEXT</a></p>`

with the following CSS:

```
p {
	unicode-bidi: plaintext;
	text-align: start;
}
```

Changing the HTML to the following configuration (a paragraph with the dir=
attribute, nested in a link) seems to fix it:

`<a href="some_link"><p dir="auto">RTL_TEXT</p></a>`
2021-06-25 02:03:09 +02:00
Mostafa Ahangarha 1b1932f787 fix feed alignment on community view 2021-06-24 17:40:02 +04:30
Samantaz Fox 9e4fd193c6 Limit descriptions width to ease mixed LTR/RTL text reading
This will prevent, on large pages, the LTR and RTL text to be
far away, on each side of the page. This could happen on channel
and playlists descriptions, when the page is displayed on a large
screen.
2021-06-24 17:35:44 +04:30
Mostafa Ahangarha d16a748f37 set alignment for feed link 2021-06-24 17:08:40 +04:30
Cadence Ember 7ec93825b6 Change description-box from flex to block
I also make minor changes to the surroundings so that the same layout
and functionality as before is preserved.
2021-06-24 15:12:05 +04:30
syeopite 349f073b8e
Remove unnecessary "Welcome, " on username display 2021-06-19 06:03:50 -07:00
Mateusz Makowski 90c907710c
Display username in header 2021-06-19 04:58:42 -07:00
syeopite 7c49a0ba7a
Rephrase auto instance redirect preference 2021-06-19 04:17:49 -07:00
syeopite 4a095eb98e
Fix <hr> styling on empty search page 2021-06-19 04:17:49 -07:00
syeopite d793d4ba78
Add switch invidious instance btn to all chan tabs 2021-06-19 04:17:49 -07:00
syeopite b9cd40fe1e
Add redirect buttons to error template 2021-06-19 04:16:18 -07:00
syeopite 173cd7c15e
Fix switch invidious instance btn on videos 2021-06-19 04:16:18 -07:00
syeopite b63bebb519
Allow automatic instance redirect to be turned off
Instead the "switch invidious instance" link would bring users to
redirect.invidious.io
2021-06-19 04:16:18 -07:00
syeopite cf72b34866
Fix locale discrepancy for instance redirect btn 2021-06-19 04:16:18 -07:00
syeopite d06cf2a07b
Add playlist redirect 2021-06-19 04:16:18 -07:00
syeopite 10804927bb
Add channel redirect 2021-06-19 04:16:18 -07:00
syeopite f178297452
Generalize redirect route 2021-06-19 04:16:18 -07:00
syeopite 311e7684b2
Add instance redirect on empty/broken search 2021-06-19 04:16:18 -07:00
syeopite 37ff2ac2b9
Overhaul button icon html and styling 2021-06-19 04:16:18 -07:00
syeopite 4786d586cf
Add new icon button for instance redirects 2021-06-19 04:16:17 -07:00
syeopite 008598b56f
Change wording of redirect hyperlink 2021-06-19 04:16:17 -07:00
syeopite f3bc55e37e
Expose instance redirect to frontend 2021-06-19 04:16:17 -07:00
Samantaz Fox a2f5342a83 Multiple search fixes
* Remove percent-encoding of the search query when calling youtube API, as it
  breaks UTF-8
* Empty search redirects to /search, not /
* Show the fullscreen search "home page" (from #1977) at /search
* Allow 'region=' parameter to be passed to /search
* Other minor fixes
2021-06-13 21:52:36 +02:00
Émilien Devos 1a2ca8634d
typo in the template file 2021-06-04 18:53:24 +00:00
syeopite f529948d81
Change videojs-vr to the unminified version 2021-05-23 09:24:49 -07:00
syeopite a0fb75efcb
Add licence for videojs-vr 2021-05-23 09:22:37 -07:00
syeopite 6e6f4d5a37
Allow configurable support of interactive 360 vid 2021-05-23 09:22:37 -07:00
syeopite df0cd30236
Add support for VR videos through videojs-vr 2021-05-23 09:22:29 -07:00
TheFrenchGhosty 75e5b49c3a
Merge pull request #2008 from syeopite/mobile-ui
Improve player controls for mobile devices
2021-05-13 10:33:47 +02:00
TheFrenchGhosty 3cf08dc451
Merge pull request #2052 from Myzel394/patch-1
Add autofocus attribute to search input
2021-05-13 10:32:38 +02:00
syeopite e6fba5d802
Fix locale discrepancy for extend desc feature 2021-05-10 00:34:34 -07:00
syeopite 50ba3c5d5c
Remove unused class attr on label 2021-05-10 00:26:43 -07:00
syeopite 65663fb857
Update code to reflect 'read more' btn name change 2021-05-10 00:26:42 -07:00
syeopite 8df2f38d34
Change wording of 'read more/less' & add to locale 2021-05-10 00:25:22 -07:00
syeopite c5fae84263
Add functionality to read more button 2021-05-10 00:25:20 -07:00
sh4dowb 533d0a1fd4
Added "Read More" button for video descriptions 2021-05-10 00:24:11 -07:00
syeopite 06b27d932d
Move player styling to separate file 2021-05-03 03:44:33 -07:00
syeopite ac1ac2cfed
Add mobile-ui js to licenses 2021-05-03 03:44:33 -07:00
syeopite 53cdb04be7
Improve mobile ux with videojs-mobile-ui 2021-05-03 03:44:33 -07:00
Myzel394 c106de02e9
Added autofocus attribute to search input
Since the main action of this form is to search something, the input should automatically be focused.
2021-04-30 15:12:36 +02:00
TheFrenchGhosty b9e57d0283
Merge pull request #1977 from syeopite/add996
Change empty home page to search engine like layout
2021-04-17 17:02:47 +00:00
syeopite 5c0458a887
Move navbar search bar render check to templated 2021-04-17 05:18:58 -07:00
syeopite 65942cd46c
Rename empty.ecr to search_homepage.ecr 2021-04-17 05:16:35 -07:00
syeopite 5f466eed79
Rename default_home option 'none' to 'Search' 2021-04-07 19:36:40 -07:00
syeopite d9528f5cc3
Change positioning of footer to use flexbox 2021-04-06 23:53:38 -07:00
syeopite 909606826d
Change footer div into footer element 2021-04-06 04:15:08 -07:00
syeopite ea16c01fa2
Fix mobile responsive design for footer 2021-04-05 20:24:02 -07:00
syeopite a8649f286c
Handle nil type for default_homepage 2021-04-04 17:19:31 -07:00
syeopite 94f285695e
Add missing closing div element 2021-04-04 16:10:27 -07:00
syeopite 049e8e07ef
Fix footer position to bottom of page 2021-04-04 02:45:38 -07:00
syeopite 716a845e92
Fix missing navbar search bar 2021-04-04 02:26:07 -07:00