Skip to content

Commit 90d1ce7

Browse files
committed
Update filebrowser.js
1 parent eb4215c commit 90d1ce7

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

filebrowser.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2261,10 +2261,19 @@ learnShare.addEventListener('click', () => {
22612261

22622262
const invite = 'Hey, I\'m using Codeit to code. It\'s a mobile code editor connected to Git. Join me! ' + window.location.origin;
22632263

2264-
// copy invite to clipboard
2265-
copy(invite).then(() => {
2266-
showMessage('Copied invite!');
2267-
});
2264+
if (isMobile) {
2265+
2266+
// share invite
2267+
navigator.share({text: invite});
2268+
2269+
} else {
2270+
2271+
// copy invite to clipboard
2272+
copy(invite).then(() => {
2273+
showMessage('Copied invite!');
2274+
});
2275+
2276+
}
22682277

22692278
})
22702279

0 commit comments

Comments
 (0)