diff --git a/public/lang/id.json b/public/lang/id.json
index e271f51..5159c4b 100644
--- a/public/lang/id.json
+++ b/public/lang/id.json
@@ -69,7 +69,9 @@
"language-selector_title": "Atur Bahasa",
"about_title": "Tentang PairDrop",
"about_aria-label": "Buka Tentang PairDrop",
- "theme-light_title": "Selalu gunakan tema terang"
+ "theme-light_title": "Selalu gunakan tema terang",
+ "edit-share-mode": "Sunting",
+ "expand_title": "Perluas baris tombol header"
},
"instructions": {
"x-instructions_mobile": "Ketuk untuk mengirim file atau ketuk lama untuk mengirim pesan",
@@ -83,7 +85,11 @@
"no-peers-title": "Buka PairDrop di perangkat lain untuk berkirim file",
"x-instructions_data-drop-peer": "Lepaskan untuk mengirim ke rekan",
"x-instructions_data-drop-bg": "Lepaskan untuk memilih penerima",
- "no-peers_data-drop-bg": "Lepaskan untuk memilih penerima"
+ "no-peers_data-drop-bg": "Lepaskan untuk memilih penerima",
+ "activate-share-mode-and-other-file": "dan 1 file lainnya",
+ "activate-share-mode-shared-file": "file yang dibagikan",
+ "activate-share-mode-shared-files-plural": "{{count}} file yang dibagikan",
+ "webrtc-requirement": "Untuk menggunakan instance PairDrop ini, WebRTC harus diaktifkan!"
},
"peer-ui": {
"processing": "Memproses…",
@@ -111,7 +117,7 @@
"join": "Gabung",
"title-image-plural": "Gambar",
"send": "Kirim",
- "base64-tap-to-paste": "Ketuk di sini untuk menempelkan {{type}}",
+ "base64-tap-to-paste": "Ketuk di sini untuk membagikan{{type}}",
"base64-text": "teks",
"copy": "Salin",
"file-other-description-image": "dan 1 gambar lainnya",
@@ -125,7 +131,7 @@
"title-image": "Gambar",
"file-other-description-file-plural": "dan {{count}} file lainnya",
"would-like-to-share": "ingin berbagi",
- "send-message-to": "Kirim pesan ke",
+ "send-message-to": "Ke:",
"language-selector-title": "Pilih Bahasa",
"pair": "Pasangkan",
"hr-or": "ATAU",
@@ -144,7 +150,11 @@
"enter-room-id-from-another-device": "Masukkan room ID dari perangkat lain untuk bergabung dengan room.",
"message_title": "Masukkan pesan untuk dikirim",
"pair-devices-qr-code_title": "Klik untuk menyalin tautan untuk memasangkan perangkat ini",
- "public-room-qr-code_title": "Klik untuk menyalin tautan ke ruang publik"
+ "public-room-qr-code_title": "Klik untuk menyalin tautan ke ruang publik",
+ "base64-title-files": "Bagikan File",
+ "base64-title-text": "Bagikan Teks",
+ "message_placeholder": "Teks",
+ "paired-device-removed": "Perangkat yang dipasangkan telah dihapus."
},
"about": {
"claim": "Cara termudah untuk mentransfer file lintas perangkat",
diff --git a/public/lang/ja.json b/public/lang/ja.json
index 32a956c..4ce93bc 100644
--- a/public/lang/ja.json
+++ b/public/lang/ja.json
@@ -69,7 +69,9 @@
"language-selector_title": "言語を設定",
"about_title": "PairDropについて",
"about_aria-label": "PairDropについてを開く",
- "theme-light_title": "常にライトテーマを使用する"
+ "theme-light_title": "常にライトテーマを使用する",
+ "edit-share-mode": "編集",
+ "expand_title": "ヘッダーボタン列を拡大する"
},
"instructions": {
"x-instructions_mobile": "タップしてファイルを送信または長押ししてメッセージを送信します",
@@ -83,7 +85,11 @@
"no-peers-title": "他のデバイスでPairDropを開いてファイルを送信します",
"x-instructions_data-drop-peer": "離すとこの相手に送信します",
"x-instructions_data-drop-bg": "送信したい相手の上で離してください",
- "no-peers_data-drop-bg": "送信したい相手の上で離してください"
+ "no-peers_data-drop-bg": "送信したい相手の上で離してください",
+ "activate-share-mode-and-other-file": "もう1つの別のファイル",
+ "activate-share-mode-shared-file": "共有されたファイル",
+ "activate-share-mode-shared-files-plural": "{{count}}個の共有されたファイル",
+ "webrtc-requirement": "このPairDropインスタンスを使用するには、WebRTCを有効にする必要があります!"
},
"peer-ui": {
"processing": "処理中…",
@@ -144,7 +150,16 @@
"enter-room-id-from-another-device": "他のデバイスに表示された参加したいルームのIDを入力します。",
"message_title": "送信するメッセージを挿入",
"pair-devices-qr-code_title": "クリックしてこのデバイスをペア設定するリンクをコピー",
- "public-room-qr-code_title": "クリックしてパブリックルームへのリンクをコピー"
+ "public-room-qr-code_title": "クリックしてパブリックルームへのリンクをコピー",
+ "paired-device-removed": "ペア設定されたデバイスが削除されました。",
+ "message_placeholder": "テキスト",
+ "base64-title-files": "共有されたファイル",
+ "base64-title-text": "テキストを共有",
+ "approve": "承諾",
+ "share-text-subtitle": "送信する前にメッセージを編集する:",
+ "share-text-checkbox": "テキストを共有するときに常にこのダイアログを表示する",
+ "close-toast_title": "通知を閉じる",
+ "share-text-title": "テキストメッセージを共有します"
},
"about": {
"claim": "デバイス間でファイルを転送する最も簡単な方法",
@@ -152,7 +167,11 @@
"close-about_aria-label": "PairDropについてを閉じる",
"buy-me-a-coffee_title": "コーヒーをおごってください!",
"github_title": "GitHubでPairDropを見る",
- "faq_title": "FAQ"
+ "faq_title": "FAQ",
+ "mastodon_title": "MastodonにPairDropについて書く",
+ "bluesky_title": "BlueSkyでフォロー",
+ "custom_title": "フォロー",
+ "privacypolicy_title": "プライバシーポリシーを開く"
},
"document-titles": {
"file-transfer-requested": "ファイルの転送がリクエストされました",
diff --git a/public/lang/tr.json b/public/lang/tr.json
index 7a08e39..dce1d1d 100644
--- a/public/lang/tr.json
+++ b/public/lang/tr.json
@@ -12,7 +12,8 @@
"cancel-share-mode": "Bitti",
"join-public-room_title": "Geçici olarak genel odaya katılın",
"language-selector_title": "Dili Seç",
- "edit-share-mode": "Düzenle"
+ "edit-share-mode": "Düzenle",
+ "expand_title": "Başlık düğmesi satırını genişlet"
},
"instructions": {
"no-peers_data-drop-bg": "Alıcıyı seçmek için bırakın",
@@ -166,7 +167,11 @@
"close-about_aria-label": "PairDrop Hakkında'yı Kapat",
"buy-me-a-coffee_title": "Bana bir kahve al!",
"github_title": "GitHub'da PairDrop",
- "faq_title": "Sıkça sorulan sorular"
+ "faq_title": "Sıkça sorulan sorular",
+ "custom_title": "Bizi takip edin",
+ "privacypolicy_title": "Gizlilik politikamızı açın",
+ "mastodon_title": "Mastodon'da PairDrop hakkında yazın",
+ "bluesky_title": "Bizi BlueSky'da takip edin"
},
"document-titles": {
"file-transfer-requested": "Dosya Transferi Talep Edildi",
diff --git a/public/scripts/ui.js b/public/scripts/ui.js
index d171258..4d9d93a 100644
--- a/public/scripts/ui.js
+++ b/public/scripts/ui.js
@@ -2021,8 +2021,8 @@ class ReceiveTextDialog extends Dialog {
if (text.length < 2000) {
// replace URLs with actual links
this.$text.innerHTML = this.$text.innerHTML
- .replace(/(^|(?<=(
|\s)))(https?:\/\/|www.)(([a-z]|[A-Z]|[0-9]|[\-_~:\/?#\[\]@!$&'()*+,;=%]){2,}\.)(([a-z]|[A-Z]|[0-9]|[\-_~:\/?#\[\]@!$&'()*+,;=%.]){2,})/g,
- (url) => {
+ .replace(/(^|
|\s|")((https?:\/\/|www.)(([a-z]|[A-Z]|[0-9]|[\-_~:\/?#\[\]@!$&'()*+,;=%]){2,}\.)(([a-z]|[A-Z]|[0-9]|[\-_~:\/?#\[\]@!$&'()*+,;=%.]){2,}))/g,
+ (match, whitespace, url) => {
let link = url;
// prefix www.example.com with http protocol to prevent it from being a relative link
@@ -2030,7 +2030,13 @@ class ReceiveTextDialog extends Dialog {
link = "http://" + link
}
- return `
${url}`;
+ // Check if link is valid
+ if (isUrlValid(link)) {
+ return `${whitespace}
${url}`;
+ }
+ else {
+ return match;
+ }
});
}
diff --git a/public/scripts/util.js b/public/scripts/util.js
index 1ab43c5..fc418ff 100644
--- a/public/scripts/util.js
+++ b/public/scripts/util.js
@@ -583,4 +583,14 @@ async function decodeBase64Text(base64) {
if (!base64) throw new Error('Base64 is empty');
return decodeURIComponent(escape(window.atob(base64)))
+}
+
+function isUrlValid(url) {
+ try {
+ let urlObj = new URL(url);
+ return true;
+ }
+ catch (e) {
+ return false;
+ }
}
\ No newline at end of file
diff --git a/public/service-worker.js b/public/service-worker.js
index 3d245ec..0e76246 100644
--- a/public/service-worker.js
+++ b/public/service-worker.js
@@ -1,4 +1,4 @@
-const cacheVersion = 'v1.10.5';
+const cacheVersion = 'v1.10.6';
const cacheTitle = `pairdrop-cache-${cacheVersion}`;
const forceFetch = false; // FOR DEVELOPMENT: Set to true to always update assets instead of using cached versions
const relativePathsToCache = [