diff --git a/package-lock.json b/package-lock.json
index 6021e85..f17cab4 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "call-me",
- "version": "1.3.18",
+ "version": "1.3.19",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "call-me",
- "version": "1.3.18",
+ "version": "1.3.19",
"license": "AGPLv3",
"dependencies": {
"@ngrok/ngrok": "1.7.0",
diff --git a/package.json b/package.json
index 273ea02..3d1ff31 100755
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "call-me",
- "version": "1.3.18",
+ "version": "1.3.19",
"description": "Your Go-To for Instant Video Calls",
"author": "Miroslav Pejic - miroslav.pejic.85@gmail.com",
"license": "AGPLv3",
diff --git a/public/client.js b/public/client.js
index 25070c1..9c9825e 100755
--- a/public/client.js
+++ b/public/client.js
@@ -543,6 +543,7 @@ function handleListeners() {
localVideoContainer.addEventListener('click', toggleFullScreen);
remoteVideo.addEventListener('click', toggleFullScreen);
usernameIn.addEventListener('keyup', (e) => handleKeyUp(e, handleSignInClick));
+ document.getElementById('randomUsernameBtn').addEventListener('click', handleRandomUsername);
document.getElementById('copyUsernameBtn').addEventListener('click', handleCopyUsername);
usersTab.addEventListener('click', () => switchTab('users'));
chatTab.addEventListener('click', () => switchTab('chat'));
@@ -794,6 +795,17 @@ async function handleShareRoomClick() {
}
}
+// Generate random username
+function handleRandomUsername() {
+ const adjectives = ['Cool', 'Fast', 'Bright', 'Swift', 'Bold', 'Calm', 'Lucky', 'Brave', 'Clever', 'Happy'];
+ const nouns = ['Fox', 'Eagle', 'Tiger', 'Wolf', 'Hawk', 'Lion', 'Bear', 'Panda', 'Falcon', 'Shark'];
+ const adj = adjectives[Math.floor(Math.random() * adjectives.length)];
+ const noun = nouns[Math.floor(Math.random() * nouns.length)];
+ const num = Math.floor(Math.random() * 1000);
+ usernameIn.value = `${adj}${noun}${num}`;
+ usernameIn.focus();
+}
+
// Copy username to clipboard
async function handleCopyUsername() {
const username = usernameIn.value.trim();
diff --git a/public/index.html b/public/index.html
index b820c6a..1146337 100755
--- a/public/index.html
+++ b/public/index.html
@@ -86,6 +86,14 @@
data-i18n-placeholder="signIn.username"
required
/>
+