From 91be122104830eab1deb161069d0847f2ecfc632 Mon Sep 17 00:00:00 2001 From: ellotheth Date: Fri, 13 Oct 2023 14:25:11 +0200 Subject: [PATCH] add a link to the raw paste from the pretty paste fixes wantguns/bin#22 --- static/js/pretty.js | 4 ++++ templates/pretty.html.tera | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/static/js/pretty.js b/static/js/pretty.js index a2ef74e..e328e2a 100644 --- a/static/js/pretty.js +++ b/static/js/pretty.js @@ -31,3 +31,7 @@ function forkClicked() { function newPasteClicked() { window.location = homePage; } + +function rawClicked() { + window.location = window.location.href.replace('/p/', '/'); +} diff --git a/templates/pretty.html.tera b/templates/pretty.html.tera index afb67e2..63f75c5 100644 --- a/templates/pretty.html.tera +++ b/templates/pretty.html.tera @@ -26,10 +26,11 @@
+
-{% endblock body %} \ No newline at end of file +{% endblock body %}