diff --git a/src/main.rs b/src/main.rs index 09b7142..d605ad2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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()); diff --git a/static/highlighted.js b/static/highlighted.js new file mode 100644 index 0000000..6c7079c --- /dev/null +++ b/static/highlighted.js @@ -0,0 +1 @@ +document.querySelector('#commentQueryForms').scrollIntoView(); \ No newline at end of file diff --git a/templates/post.html b/templates/post.html index 0902e03..17ad456 100644 --- a/templates/post.html +++ b/templates/post.html @@ -31,6 +31,9 @@ {% else %} + {% if single_thread %} + + {% endif %} {% endif %} {% endblock %}