Commit Graph

36 Commits (93c1a1d42e3f145f1e030a793a2c709be209a21b)

Author SHA1 Message Date
meow 3431a1b1de `console.warn` and `info` instead of `log`
meow cdd5a9e935 replace huphen-minus to real minus
meow c4cc50ca39 replace innerHTML to safer textContent where possible
meow 9b09d369d9 add variable declarations
meow 12ab11413f fix double variable declaration
meow 38ef0b10e7 eqeqeq
meow c72d3c4a0e semicolons
meow eb7e48b059 use strict
diogo f13fb80b42
scroll the nextVideo into the top
Andrew Zhao 89fd35e02d fix comment replies
Andrew Zhao 5a08dfa72f fix incorrect use of setinterval in js
saltycrys 680dc1f962 Shuffle URL params
The `list` and `index` params are the most important and come first now.
leonklingele 70cbe91776
Migrate to a good Content Security Policy ()
So attacks such as XSS (see [0]) will no longer be of an issue.

[0]: https://github.com/omarroth/invidious/issues/1022
Omar Roth 23ccaea2ff
Fix comment event listener
Omar Roth be055d9dcb
Add support for custom playlists
leonklingele e6b4e12689 js: add support for keydown events ()
* js: add support for keydown events

This will modify the player behavior even if the player element is unfocused.

Based on the YouTube key bindings, allow to

- toggle playback with space and 'k' key
- increase and decrease player volume with up / down arrow key
- mute and unmute player with 'm' key
- jump forwards and backwards by 5 seconds with right / left arrow key
- jump forwards and backwards by 10 seconds with 'l' / 'j'  key
- set video progress with number keys 0–9
- toggle captions with 'c' key
- toggle fullscreen mode with 'f' key
- play next video with 'N' key
- increase and decrease playback speed with '>' / '<' key

* js: remove unused dependency 'videojs.hotkeys.min.js'

Support for controlling the player volume by scrolling over it is
still retained by copying over the relevant code part from the
aforementioned library.
Omar Roth d034fecc89
Remove default arguments from function definitions
Omar Roth 17edfd6573
Shorten timeout for AJAX
Omar Roth 552f616305
Fix retry on timeout for AJAX requests
Omar Roth 8c944815bc
Minor refactor
Omar Roth efd54b7523
Add 'comments' as URL parameter
Omar Roth de77c71042
Add "local" to "next video" URLs
Omar Roth 7d2e1f63b5
Refactor watched_widget.js
Omar Roth e833ccf309
Fix comments for age-restricted videos
Omar Roth 058711d3a8
Refactor player.js
Omar Roth 2faa2ed1f4
Refactor watch.js
Omar Roth 1a9360ca75
Minor formatting changes
Omar Roth 1692f7640c Remove JS from download widget
Omar Roth f8467fcda6 Fix locale text for "Show replies"
Omar Roth c0fdc28a84 Fix colors and data-url in download widget
Omar Roth 1a9057a175 Add fix to download widget for titles with unescaped characters
Omar Roth 08e8d0f56f Fix typo in default.css
Omar Roth fb535ad6bb Add download widget
Omar Roth 3ee7201f5d Comma seperate comment scores
Omar Roth 57d88ffcc8 Fix fallback for comments
Omar Roth f7125c1204 Move watch page JS into seperate file