diff --git a/assets/js/script.js b/assets/js/script.js index 9d7fccb..fe0bfab 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -337,6 +337,10 @@ function cleanUrl(url) { return randomizeCase(finalUrl); } +function removeEmoji(remarks) { + return remarks.replace(/[\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{1F700}-\u{1F77F}\u{1F780}-\u{1F7FF}\u{1F800}-\u{1F8FF}\u{1F900}-\u{1F9FF}\u{1FA00}-\u{1FA6F}\u{2600}-\u{26FF}\u{2700}-\u{27BF}]/gu, '').replace(/\s+/g, ' ') +} + function generateJson() { return new Promise((resolve, reject) => { let protocol = $('#protocol').val(); @@ -367,6 +371,7 @@ function generateJson() { if ( remarks === "") { remarks = "IRCF Fragment"; } + remarks = removeEmoji(remarks); if ( uuid === '' || sni === ''|| port === '' ) { alert('فرم را تکمیل نمایید.'); return false; diff --git a/index.html b/index.html index 108020d..c74a845 100644 --- a/index.html +++ b/index.html @@ -276,7 +276,7 @@ - +