Skip to content

Commit

Permalink
add a link to the raw paste from the pretty paste
Browse files Browse the repository at this point in the history
fixes #22
  • Loading branch information
ellotheth authored and wantguns committed Oct 14, 2023
1 parent e8fac0f commit 91be122
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions static/js/pretty.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ function forkClicked() {
function newPasteClicked() {
window.location = homePage;
}

function rawClicked() {
window.location = window.location.href.replace('/p/', '/');
}
3 changes: 2 additions & 1 deletion templates/pretty.html.tera
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@
</div>
<div class="topRightBox">
<button id="wrapBtn" onclick="wrapClicked()">&#9166; Wrap</button>
<button id="rawBtn" onclick="rawClicked()">= Raw</button>
<button id="forkBtn" onclick="forkClicked()">&#x2442; Fork</button>
<button id="newPasteBtn" onclick="newPasteClicked()">&#43; New</button>
</div>
</div>

<script src="/static/js/pretty.js"></script>
{% endblock body %}
{% endblock body %}

0 comments on commit 91be122

Please sign in to comment.