watch.html: Move loose inline javascript into watch.js

The number of inline code blocks and the dependencies between them
became unmanageable.

From 9d96c07a3c2e68f1893634574c3be64e41a2c041 Mon Sep 17 00:00:00 2001
From: James Taylor <user234683@users.noreply.github.com>
This commit is contained in:
Jesús
2021-08-29 22:43:10 -05:00
parent 56b17c634c
commit 309ff40943
5 changed files with 209 additions and 236 deletions

View File

@@ -654,7 +654,6 @@ def get_watch_page(video_id=None):
invidious_reload_button = info['invidious_reload_button'],
video_url = util.URL_ORIGIN + '/watch?v=' + video_id,
video_id = video_id,
time_start = time_start,
js_data = {
'video_id': info['id'],
@@ -663,6 +662,10 @@ def get_watch_page(video_id=None):
'has_manual_captions': any(s.get('on') for s in subtitle_sources),
**source_info,
'using_pair_sources': using_pair_sources,
'time_start': time_start,
'playlist': info['playlist'],
'related': info['related_videos'],
'playability_error': info['playability_error'],
},
font_family=youtube.font_choices[settings.font],
**source_info,