Skip to content

Commit

Permalink
document.execCommand is deprecated, replace with the Clipboard API.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed Oct 14, 2021
1 parent 552dff1 commit 2e9bf87
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions public/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,9 @@ $(document).ready(async function() {
});

$("#copy-button").click(function() {
$("#feed-url").select();
document.execCommand("copy");
const feed_url = $("#feed-url");
feed_url.select();
navigator.clipboard.writeText(feed_url.val());
});

$("#feed-modal form").submit(function(event) {
Expand Down

0 comments on commit 2e9bf87

Please sign in to comment.