Skip to content

Commit

Permalink
بهبود دریافت کد فرگمنت
Browse files Browse the repository at this point in the history
  • Loading branch information
ircfspace committed Feb 14, 2024
1 parent 05783ea commit 2655983
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 23 deletions.
12 changes: 12 additions & 0 deletions assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,18 @@ input:checked + .slider {
margin: 0px 0 -7px 0;
font-size: 30px;
}
.modal-footer button {
float: right;
width: 50%;
margin-right: 0!important;
margin-bottom: 5px!important;
}
.modal-footer button:nth-child(odd) {
margin-left: 5px!important;
}
.modal-footer button:nth-child(even) {
width: calc(50% - 5px)
}

.tooltip .tooltip-inner {
font: 11px vazir;
Expand Down
2 changes: 1 addition & 1 deletion assets/js/lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function setLanguagePreference(lang) {
}

async function fetchLanguageData(lang) {
const response = await fetch("assets/lang/"+lang+".json?v1.12");
const response = await fetch("assets/lang/"+lang+".json?v1.12.1");
return response.json();
}

Expand Down
3 changes: 2 additions & 1 deletion assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ $(document).on('click', '#getFile', function(e) {
});
});

$(document).on('click', '#copyCode', function (e) {
$(document).on('click', '#copyCode, #copyJsonFromQR', function (e) {
e.preventDefault();
generateJson()
.then(data => {
Expand All @@ -465,6 +465,7 @@ $(document).on('click', '#copyCode', function (e) {
input.select();
input.setSelectionRange(0, 99999);
document.execCommand('copy');
$("#qrModal").modal('hide');
alert('کد در کلیپ‌بورد کپی شد.');
})
.catch(error => {
Expand Down
1 change: 1 addition & 0 deletions assets/lang/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"config_form_copyurl": "复制网址",
"config_form_jsonurl": "查看代码",
"config_form_qrcode": "QR码",
"config_form_convert": "转换为片段",
"config_switch_tls": "TLS",
"config_switch_tls_tooltip": "切换TLS片段和TCP段之间的能力",
"config_switch_insecure": "不安全",
Expand Down
1 change: 1 addition & 0 deletions assets/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"config_form_copyurl": "Copy URL",
"config_form_jsonurl": "View code",
"config_form_qrcode": "QR CODE",
"config_form_convert": "Convert to Fragment",
"config_switch_tls": "TLS",
"config_switch_tls_tooltip": "the ability to switch between TLS Fragment and TCP Segment",
"config_switch_insecure": "Insecure",
Expand Down
1 change: 1 addition & 0 deletions assets/lang/fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"config_form_copy": "کپی کد",
"config_form_copyurl": "کپی آدرس",
"config_form_jsonurl": "مشاهده کد",
"config_form_convert": "تبدیل به فرگمنت",
"config_form_qrcode": "QR CODE",
"config_switch_tls": "TLS",
"config_switch_tls_tooltip": "امکان سوییچ بین حالت TLS Fragment و TCP Segment",
Expand Down
1 change: 1 addition & 0 deletions assets/lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"config_form_copyurl": "Скопируйте URL",
"config_form_jsonurl": "Посмотреть код",
"config_form_qrcode": "QR-код",
"config_form_convert": "Преобразовать в фрагмент",
"config_switch_tls": "TLS",
"config_switch_tls_tooltip": "Возможность переключения между фрагментацией TLS и сегментацией TCP",
"config_switch_insecure": "Небезопасный",
Expand Down
31 changes: 10 additions & 21 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<link href="./assets/css/bootstrap.min.css" rel="stylesheet" />
<link href="./assets/css/bootstrap-rtl.min.css" rel="stylesheet" />
<link href="./assets/css/vazir.css" rel="stylesheet" />
<link href="./assets/css/style.css?v1.11" rel="stylesheet" />
<link href="./assets/css/style.css?v1.12.1" rel="stylesheet" />
<link href="./assets/css/lang.css?v1.11" rel="stylesheet" />
<title>IRCF | ابزار فرگمنت</title>
<meta name="description" content="توسط ابزار فرگمنت می‌تونین دامنه‌های مرده‌تون رو مجدد زنده کنید!" />
Expand Down Expand Up @@ -160,23 +160,7 @@ <h1>اینترنت برای همه؛ یا هیچ‌کس!</h1>
<label for="napsternetV" data-toggle="tooltip" data-i18n-title="config_app_name_napsternetV_tooltip">NapsternetV</label>
</div>
<div class="clearfix"></div>
<div class="input-group fetchIps">
<button class="btn btn-info" type="submit" id="getFile" data-i18n="config_form_submit"></button>
<div class="input-group-btn">
<div class="btn-group">
<div class="btn-group scanOpt">
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" id="newScan">
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li class="hidden"><a href="javascript:;" id="jsonUrl" data-i18n="config_form_jsonurl"></a></li>
<li><a href="javascript:;" id="qrGen" data-i18n="config_form_qrcode"></a></li>
<li><a href="javascript:;" id="copyCode" data-i18n="config_form_copy"></a></li>
</ul>
</div>
</div>
</div>
</div>
<button class="btn btn-info" type="submit" id="qrGen" data-i18n="config_form_convert"></button>
<div class="clearfix"></div>
<textarea id="jsonOutput" class="jsonOutput"></textarea>
<div class="clearfix"></div>
Expand Down Expand Up @@ -234,12 +218,17 @@ <h4 class="modal-title dirLeft">QRCode</h4>
</div>
<div class="modal-body">
<div class="qrcode" id="qrcode">
<img src="" alt="qrcode" />
<a href="javascript:;" id="copyJsonFromQR">
<img src="" alt="qrcode" />
</a>
<input class="form-control dirLeft" value="" />
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" id="copyUrl" data-i18n="config_form_copyurl"></button>
<button type="button" class="btn btn-default" id="jsonUrl" data-i18n="config_form_jsonurl"></button>
<button type="button" class="btn btn-default" id="getFile" data-i18n="config_form_submit"></button>
<button type="button" class="btn btn-default" id="copyCode" data-i18n="config_form_copy"></button>
</div>
</div>
</div>
Expand All @@ -256,8 +245,8 @@ <h4 class="modal-title dirLeft">QRCode</h4>
</div>
<script src="./assets/js/jquery.min.js"></script>
<script src="./assets/js/bootstrap.min.js"></script>
<script src="./assets/js/lang.js?v1.12"></script>
<script src="./assets/js/script.js?v1.12"></script>
<script src="./assets/js/lang.js?v1.12.1"></script>
<script src="./assets/js/script.js?v1.12.1"></script>
</footer>
</div>
</div>
Expand Down

0 comments on commit 2655983

Please sign in to comment.