Merge branch 'master' into live

This commit is contained in:
Kevin Morris 2022-03-08 00:00:47 -08:00
commit 7869a35432
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
6 changed files with 13 additions and 11 deletions

View file

@ -6,7 +6,7 @@ from typing import Any
# Publicly visible version of aurweb. This is used to display
# aurweb versioning in the footer and must be maintained.
# Todo: Make this dynamic/automated.
AURWEB_VERSION = "v6.0.21"
AURWEB_VERSION = "v6.0.22"
_parser = None

View file

@ -8,7 +8,7 @@
#
[tool.poetry]
name = "aurweb"
version = "v6.0.21"
version = "v6.0.22"
license = "GPL-2.0-only"
description = "Source code for the Arch User Repository's website"
homepage = "https://aur.archlinux.org"

View file

@ -160,4 +160,3 @@
</table>
<script type="text/javascript" src="/static/js/copy.js"></script>

View file

@ -1,6 +1,9 @@
document.addEventListener('DOMContentLoaded', function() {
document.querySelector('.copy').addEventListener('click', function(e) {
e.preventDefault();
navigator.clipboard.writeText(event.target.text);
});
let elements = document.querySelectorAll('.copy');
elements.forEach(function(el) {
el.addEventListener('click', function(e) {
e.preventDefault();
navigator.clipboard.writeText(e.target.text);
});
});
});

View file

@ -309,9 +309,9 @@ endif;
<script>
document.addEventListener('DOMContentLoaded', function() {
document.querySelector('.copy').addEventListener('click', function(e) {
document.querySelectorAll('.copy').addEventListener('click', function(e) {
e.preventDefault();
navigator.clipboard.writeText(event.target.text);
navigator.clipboard.writeText(e.target.text);
});
});
</script>

View file

@ -138,9 +138,9 @@ endif;
<script>
document.addEventListener('DOMContentLoaded', function() {
document.querySelector('.copy').addEventListener('click', function(e) {
document.querySelectorAll('.copy').addEventListener('click', function(e) {
e.preventDefault();
navigator.clipboard.writeText(event.target.text);
navigator.clipboard.writeText(e.target.text);
});
});
</script>