aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/templates
diff options
context:
space:
mode:
Diffstat (limited to 'youtube/templates')
-rw-r--r--youtube/templates/base.html4
-rw-r--r--youtube/templates/watch.html15
2 files changed, 12 insertions, 7 deletions
diff --git a/youtube/templates/base.html b/youtube/templates/base.html
index f325f86..df7bb99 100644
--- a/youtube/templates/base.html
+++ b/youtube/templates/base.html
@@ -4,7 +4,9 @@
<meta charset="utf-8">
<title>{{ page_title }}</title>
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline'; media-src 'self' https://*.googlevideo.com;
- {{ "img-src https://*.googleusercontent.com https://*.ggpht.com https://*.ytimg.com;" if not settings.proxy_images else "" }}">
+ {{ "img-src https://*.googleusercontent.com https://*.ggpht.com https://*.ytimg.com;" if not settings.proxy_images else "" }}
+ {{ "" if not settings.use_sponsorblock_js else "connect-src 'self' https://sponsor.ajay.app;"|safe }}">
+
<link href="{{ theme_path }}" type="text/css" rel="stylesheet">
<link href="/youtube.com/static/shared.css" type="text/css" rel="stylesheet">
<link href="/youtube.com/static/comments.css" type="text/css" rel="stylesheet">
diff --git a/youtube/templates/watch.html b/youtube/templates/watch.html
index 86644ea..d89cc05 100644
--- a/youtube/templates/watch.html
+++ b/youtube/templates/watch.html
@@ -494,6 +494,12 @@ Reload without invidious (for usage of new identity button).</a>
<p>Used Invidious as fallback.</p>
{% endif %}
<p class="allowed-countries">Allowed countries: {{ allowed_countries|join(', ') }}</p>
+
+ {% if settings.use_sponsorblock_js %}
+ <ul class="more-actions">
+ <li><label><input type=checkbox id=skip_sponsors checked>skip sponsors</label> <span id=skip_n></span>
+ </ul>
+ {% endif %}
</div>
</details>
</div>
@@ -691,10 +697,7 @@ Reload without invidious (for usage of new identity button).</a>
<script src="/youtube.com/static/js/common.js"></script>
<script src="/youtube.com/static/js/transcript-table.js"></script>
- {% if settings.use_video_hotkeys %}
- <script src="/youtube.com/static/js/hotkeys.js"></script>
- {% endif %}
- {% if settings.use_comments_js %}
- <script src="/youtube.com/static/js/comments.js"></script>
- {% endif %}
+ {% if settings.use_video_hotkeys %} <script src="/youtube.com/static/js/hotkeys.js"></script> {% endif %}
+ {% if settings.use_comments_js %} <script src="/youtube.com/static/js/comments.js"></script> {% endif %}
+ {% if settings.use_sponsorblock_js %} <script src="/youtube.com/static/js/sponsorblock.js"></script> {% endif %}
{% endblock main %}