Skip to content

Commit

Permalink
undo
Browse files Browse the repository at this point in the history
  • Loading branch information
ircfspace committed Feb 23, 2024
1 parent 8d78503 commit d289a1d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,13 @@ $(document).on('keyup', '#defConfig', function(e) {
$('#stream option[value="'+ (defConfig.type === 'ws' ? 'ws' : 'grpc') +'"]').attr('selected', 'selected').prop('selected', true).trigger('change');
}
let port = String(getAddress(config)[1]).replace('/', '');
if ( ! ports.includes(port) ) {
/*if ( ! ports.includes(port) ) {
alert('باید یکی‌از پورت‌های کلودفلر را انتخاب کنید!');
resetForm();
return false;
}
$('#port option[value="'+ port +'"]').attr('selected', 'selected').prop('selected', true).trigger('change');
$('#port option[value="'+ port +'"]').attr('selected', 'selected').prop('selected', true).trigger('change');*/
$('#port').val(port);
$('#sni').val(defConfig.host);
if ( (protocol === 'vmess' && defConfig.tls === "tls") || (protocol === 'vless' && defConfig.security === "tls") || (protocol === 'trojan' && defConfig.security === "tls") ) {
$('#tls').prop('checked', true);
Expand Down
7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h1>اینترنت برای همه؛ یا هیچ‌کس!</h1>
<div class="xsWidth">
<input class="form-control dirLeft" data-i18n-label="config_form_sni" id="sni" />
<input class="form-control dirLeft" data-i18n-label="config_form_path" id="path" />
<select class="form-control dirLeft" id="port">
<!--<select class="form-control dirLeft" id="port">
<option value="80">80</option>
<option value="443" selected>443</option>
<option value="2052">2052</option>
Expand All @@ -116,7 +116,8 @@ <h1>اینترنت برای همه؛ یا هیچ‌کس!</h1>
<option value="8080">8080</option>
<option value="8443">8443</option>
<option value="8880">8880</option>
</select>
</select>-->
<input class="form-control dirLeft" data-i18n-label="config_form_port" id="port" type="number" min="80" />
</div>
<div class="minWidth firstlg">
<input class="form-control dirLeft" data-i18n-label="config_form_uuid" id="uuid" />
Expand Down Expand Up @@ -270,7 +271,7 @@ <h4 class="modal-title dirLeft">QRCode</h4>
<script src="./assets/js/jquery.min.js"></script>
<script src="./assets/js/bootstrap.min.js"></script>
<script src="./assets/js/lang.js?v1.12.3"></script>
<script src="./assets/js/script.js?v1.13.5"></script>
<script src="./assets/js/script.js?v1.13.6"></script>
</footer>
</div>
</div>
Expand Down

0 comments on commit d289a1d

Please sign in to comment.