diff --git a/kn/subscriptions/media/event_detail.js b/kn/subscriptions/media/event_detail.js
index 19f9d8ded..50398c94f 100644
--- a/kn/subscriptions/media/event_detail.js
+++ b/kn/subscriptions/media/event_detail.js
@@ -27,21 +27,18 @@ function reopen_event () {
event_set_opened('true');
}
-function copy_emailaddresses_to_clipboard () {
- _api({'action': 'get-email-addresses',
- 'id': event_object_id},
- function(d) {
- if(d.error) {
- alert(d.error);
- return;
- }
- var s = '';
- var first = true;
- for(var i = 0; i < d.addresses.length; i++) {
- if (first) first = false;
- else s += ', ';
- s += d.addresses[i];
- }
- prompt("Dit zijn de e-mail adressen", s);
- });
+function copy_emailaddresses_to_clipboard (elem) {
+ var emails = [].join.call($('#subscribed > li > a').map(function() {
+ return $(this).data('email')
+ }), ', ');
+ if (navigator.clipboard && navigator.clipboard.writeText) {
+ navigator.clipboard.writeText(emails).catch(function(rej) {
+ prompt("Dit zijn de e-mail adressen", emails);
+ }).then(function() {
+ $(elem).text("Gekopieerd!");
+ })
+ } else {
+ prompt("Dit zijn de e-mail adressen", emails);
+ }
+ return true;
}
diff --git a/kn/subscriptions/templates/subscriptions/event_detail.html b/kn/subscriptions/templates/subscriptions/event_detail.html
index acb8f1800..50c66e8ff 100644
--- a/kn/subscriptions/templates/subscriptions/event_detail.html
+++ b/kn/subscriptions/templates/subscriptions/event_detail.html
@@ -154,24 +154,24 @@
{{ object.humanName }}
{% endif %}{# has_write_access #}
{% if has_read_access or object.has_public_subscriptions %}
-