mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 03:26:16 +00:00
Add clipboard function
This commit is contained in:
parent
e9e3706172
commit
76cc8456d2
4 changed files with 12 additions and 21 deletions
|
@ -9,15 +9,6 @@
|
|||
{% endif %}
|
||||
|
||||
<script type="text/javascript">
|
||||
function groupShare() {
|
||||
try {
|
||||
navigator.clipboard.writeText(window.location.href)
|
||||
addNotification("Copied link!", 4);
|
||||
} catch (err) {
|
||||
addNotification("Failed to copy link! Are you on HTTP?", 2);
|
||||
}
|
||||
}
|
||||
|
||||
{% if current_user.id == group.author.id %}
|
||||
function groupDelete() {
|
||||
cancelBtn = document.createElement('button');
|
||||
|
@ -240,7 +231,7 @@
|
|||
<p class="banner-subtitle">{{ images|length }} Images · {{ group.description }}</p>
|
||||
<div class="pill-row">
|
||||
<div>
|
||||
<button class="pill-item" onclick="groupShare()"><i class="ph ph-export"></i></button>
|
||||
<button class="pill-item" onclick="copyToClipboard(window.location.href)"><i class="ph ph-export"></i></button>
|
||||
</div>
|
||||
{% if current_user.id == group.author.id %}
|
||||
<div>
|
||||
|
@ -258,7 +249,7 @@
|
|||
<p class="banner-info">By {{ group.author.username }}</p>
|
||||
<div class="pill-row">
|
||||
<div>
|
||||
<button class="pill-item" onclick="groupShare()"><i class="ph ph-export"></i></button>
|
||||
<button class="pill-item" onclick="copyToClipboard(window.location.href)"><i class="ph ph-export"></i></button>
|
||||
</div>
|
||||
{% if current_user.id == group.author.id %}
|
||||
<div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue