feat: #11537, copy ip on click

This commit is contained in:
Barış Soner Uşaklı
2023-04-30 12:47:00 -04:00
parent 9f485ce6f1
commit 4aa87366f9
2 changed files with 7 additions and 1 deletions

View File

@@ -110,7 +110,12 @@ define('forum/chats', [
if (err) {
return alerts.error(err);
}
ipEl.html(ip);
ipEl.text(ip);
ipEl.on('click', () => {
navigator.clipboard.writeText(ip);
ipEl.translateText('[[global:copied]]');
setTimeout(() => ipEl.text(ip), 2000);
});
});
});
};