Skip to content

Commit

Permalink
Copy the right origin on self hosted instances
Browse files Browse the repository at this point in the history
Closes #11
  • Loading branch information
SuperSandro2000 authored and nyancrimew committed Apr 7, 2020
1 parent 2b3880f commit c1fc344
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/resources/static/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ haste.prototype.configureButtons = function () {
{
$where: $('.btn.copy_url'),
action: function () {
_this.copyTextToClipboard($('#url_display').attr("href"))
_this.copyTextToClipboard(window.location.origin + $('#url_display').attr("href"))
}
}
];
Expand Down
4 changes: 2 additions & 2 deletions app/resources/templates/index.peb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</label>
</div>
{% else %}
<a id="url_display" href="https://del.dog/{{ document.slug }}">/{{ document.slug }}</a>
<a id="url_display" href="/{{ document.slug }}">/{{ document.slug }}</a>
<button class="copy_url btn enabled" tabindex="2"><img src="{{ ghostbuster("/static/icons/copy.svg") }}"
alt="Copy URL"></button>
{% endif %}
Expand Down Expand Up @@ -99,4 +99,4 @@
});
</script>
{{ stats_embed | raw }}
{% endblock %}
{% endblock %}

0 comments on commit c1fc344

Please sign in to comment.