-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
188 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
html[lang="en"] body { | ||
direction: ltr; | ||
text-align: left; | ||
} | ||
|
||
.flags { | ||
float: left; | ||
margin: 10px 0 -10px 0; | ||
} | ||
html[lang="en"] .flags { | ||
float: right; | ||
} | ||
html[lang="en"] nav, | ||
html[lang="en"] .nav, | ||
html[lang="en"] footer { | ||
direction: rtl; | ||
} | ||
.flags li { | ||
float: left; | ||
list-style: none; | ||
margin-right: 3px; | ||
} | ||
.flags li a { | ||
float: left; | ||
border: 3px solid transparent; | ||
} | ||
.flags li a.active { | ||
border-color: #ccc; | ||
} | ||
.flags li img { | ||
float: left; | ||
width: 25px; | ||
height: 15px; | ||
object-fit: cover; | ||
} | ||
|
||
html[lang="en"] .fetchIps button:first-child { | ||
border-radius: 5px 0 0 5px; | ||
} | ||
html[lang="en"] .fetchIps button:last-child { | ||
border-radius: 0 5px 5px 0; | ||
border-right: 1px solid #adadad; | ||
border-left: inherit; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
function updateContent(langData) { | ||
document.querySelectorAll('[data-i18n]').forEach(element => { | ||
const key = element.getAttribute('data-i18n'); | ||
if (key) { | ||
element.textContent = langData[key]; | ||
} | ||
}); | ||
document.querySelectorAll('[data-i18n-label]').forEach(element => { | ||
const label = element.getAttribute('data-i18n-label'); | ||
if (label) { | ||
element.placeholder = langData[label]; | ||
} | ||
}); | ||
} | ||
|
||
function setLanguagePreference(lang) { | ||
localStorage.setItem('language', lang); | ||
//location.reload(); | ||
} | ||
|
||
async function fetchLanguageData(lang) { | ||
const response = await fetch("assets/lang/"+lang+".json"); | ||
return response.json(); | ||
} | ||
|
||
async function changeLanguage(lang) { | ||
await setLanguagePreference(lang); | ||
const langData = await fetchLanguageData(lang); | ||
updateContent(langData); | ||
$('#flags li [data-lang]').removeClass('active'); | ||
$('#flags li [data-lang="'+lang+'"]').addClass('active'); | ||
$('html').attr('lang', lang); | ||
//toggleArabicStylesheet(lang); // Toggle Arabic stylesheet | ||
} | ||
|
||
window.addEventListener('DOMContentLoaded', async () => { | ||
const userPreferredLanguage = localStorage.getItem('language') || 'fa'; | ||
$('#flags li [data-lang]').removeClass('active'); | ||
$('#flags li [data-lang="'+userPreferredLanguage+'"]').addClass('active'); | ||
$('html').attr('lang', userPreferredLanguage); | ||
console.log(userPreferredLanguage) | ||
const langData = await fetchLanguageData(userPreferredLanguage); | ||
updateContent(langData); | ||
//toggleArabicStylesheet(userPreferredLanguage); | ||
}); | ||
|
||
$(document).on('click', 'a[data-lang]', function(e) { | ||
e.preventDefault(); | ||
let lang = $(this).data('lang'); | ||
changeLanguage(lang); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"welcome_message": "Using the Fragment tool, you can revive your dead domains!", | ||
"config_input": "Provide a VLESS/VMESS configuration with WS type:", | ||
"config_input_label": "Your Config", | ||
"config_input_submit": "Check", | ||
"config_form_ortext": "OR", | ||
"config_form_label": "Manually complete the following settings:", | ||
"config_form_protocol": "Protocol", | ||
"config_form_uuid": "UUID", | ||
"config_form_port": "PORT", | ||
"config_form_cleanip": "CleanIP (default: zula.ir)", | ||
"config_form_sni": "SNI", | ||
"config_form_path": "PATH", | ||
"config_form_submit": "Create a JSON file", | ||
"config_form_copy": "Copy Code", | ||
"config_swith_tls": "TLS", | ||
"config_swith_insecure": "Insecure", | ||
"config_swith_earlydata": "Early Data", | ||
"config_swith_mux": "Mux", | ||
"config_mux_label": "the value of Concurrency", | ||
"config_mux_concurrency": "Concurrency", | ||
"config_fragment_label": "the values for Fragments", | ||
"config_fragment_packets": "Packets", | ||
"config_fragment_length": "Length", | ||
"config_fragment_interval": "Interval" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"welcome_message": "توسط ابزار فرگمنت میتونین دامنههای مردهتون رو مجدد زنده کنید!", | ||
"config_input": "یک کانفیگ VLESS/VMESS از نوع webSocket وارد کنین:", | ||
"config_input_label": "Your Config", | ||
"config_input_submit": "بررسی", | ||
"config_form_ortext": "یا", | ||
"config_form_label": "تنظیمات زیر رو بهصورت دستی تکمیل کنین:", | ||
"config_form_protocol": "پروتکل", | ||
"config_form_uuid": "UUID", | ||
"config_form_port": "PORT", | ||
"config_form_cleanip": "CleanIP (default: zula.ir)", | ||
"config_form_sni": "SNI", | ||
"config_form_path": "PATH", | ||
"config_form_submit": "ایجاد فایل JSON", | ||
"config_form_copy": "کپی کد", | ||
"config_swith_tls": "TLS", | ||
"config_swith_insecure": "Insecure", | ||
"config_swith_earlydata": "Early Data", | ||
"config_swith_mux": "Mux", | ||
"config_mux_label": "مقدار Concurrency", | ||
"config_mux_concurrency": "concurrency", | ||
"config_fragment_label": "مقادیر فرگمنت", | ||
"config_fragment_packets": "Packets", | ||
"config_fragment_length": "Length", | ||
"config_fragment_interval": "Interval" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters