Skip to content

Commit

Permalink
fix copying link
Browse files Browse the repository at this point in the history
  • Loading branch information
dimdenGD committed Jul 23, 2024
1 parent ec0d075 commit c5c29e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/profile/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -1732,10 +1732,10 @@ async function renderProfile() {
renderLists();
});
document.getElementById('profile-settings-share').addEventListener('click', async () => {
navigator.share({ url: `/${pageUser.screen_name}` });
navigator.share({ url: `https://${location.hostname}/${pageUser.screen_name}` });
});
document.getElementById('profile-settings-copy').addEventListener('click', async () => {
navigator.clipboard.writeText(`/${pageUser.screen_name}`);
navigator.clipboard.writeText(`https://${location.hostname}/${pageUser.screen_name}`);
});
if(document.getElementById('profile-settings-copy-id')) document.getElementById('profile-settings-copy-id').addEventListener('click', async () => {
navigator.clipboard.writeText(pageUser.id_str);
Expand Down

0 comments on commit c5c29e8

Please sign in to comment.