mirror of
https://github.com/redlib-org/redlib.git
synced 2026-06-11 04:34:27 -04:00
Add scrolling to highlighted comment (fix #13)
This commit is contained in:
@@ -229,6 +229,9 @@ async fn main() {
|
||||
app
|
||||
.at("/hls.min.js")
|
||||
.get(|_| resource(include_str!("../static/hls.min.js"), "text/javascript", false).boxed());
|
||||
app
|
||||
.at("/highlighted.js")
|
||||
.get(|_| resource(include_str!("../static/highlighted.js"), "text/javascript", false).boxed());
|
||||
|
||||
// Proxy media through Redlib
|
||||
app.at("/vid/:id/:size").get(|r| proxy(r, "https://v.redd.it/{id}/DASH_{size}").boxed());
|
||||
|
||||
1
static/highlighted.js
Normal file
1
static/highlighted.js
Normal file
@@ -0,0 +1 @@
|
||||
document.querySelector('#commentQueryForms').scrollIntoView();
|
||||
@@ -31,6 +31,9 @@
|
||||
<meta property="og:video:type" content="video/mp4">
|
||||
{% else %}
|
||||
<meta property="og:type" content="website">
|
||||
{% if single_thread %}
|
||||
<script src="/highlighted.js" defer></script>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user