Skip to content
This repository has been archived by the owner on Nov 24, 2024. It is now read-only.

Commit

Permalink
تغییر رنجهای متداول ایرانسل و همراه اول
Browse files Browse the repository at this point in the history
  • Loading branch information
ircfspace committed Apr 6, 2023
1 parent fde120a commit 72decf1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 8 additions & 3 deletions assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ async function testIPs(ipList, totalIp, timeout, betaVersion) {
return acc;
}
}, []);
const sortedArr = uniqueArr.sort((a, b) => a.time - b.time);
let sortedArr = uniqueArr.sort((a, b) => a.time - b.time);
//sortedArr = sortedArr.slice(0, 50);
const tableRows = sortedArr.map((obj, key) => { return `<tr><td>${(key+1)}</td><td class="copyItem" onclick="copyToClipboard('${obj.ip}')">${obj.ip}</td><td>${numberWithCommas(obj.time)} <small>میلی‌ثانیه</small></td></tr>` }).join('\n');
document.getElementById('result').innerHTML = tableRows;
}
Expand Down Expand Up @@ -228,7 +229,7 @@ $(document).on('change', '#forMtn', function(e) {
let vl = options[i].value;
if (vl === "") { continue; }
if (typeof vl === "null") { continue; }
if ( ! vl.startsWith("45.", 0) ) { continue; }
if ( ! ['45.', '104.'].some((word) => vl.startsWith(word)) ) { continue; }
cfIPv4.push(vl);
}
});
Expand All @@ -242,7 +243,7 @@ $(document).on('change', '#forMci', function(e) {
let vl = options[i].value;
if (vl === "") { continue; }
if (typeof vl === "null") { continue; }
if ( ! ['108.', '23.', '45.', '63.', '66.', '104.', '141.', '147.', '159.', '172.', '185.', '188.', '195.'].some((word) => vl.startsWith(word)) ) { continue; }
if ( ! ['104.', '108.', '141.', '172.', '185.', '192.', '194.'].some((word) => vl.startsWith(word)) ) { continue; }
cfIPv4.push(vl);
}
});
Expand Down Expand Up @@ -383,6 +384,10 @@ function getIpInfo(entry) {
ipInfo['providerCode'] = 'apt';
ipInfo['providerName'] = 'آپتل';
}
else if ( data.includes('Didehban Net Company PJS') ) {
ipInfo['providerCode'] = 'dbn';
ipInfo['providerName'] = 'دیده‌بان‌نت';
}
}
provider = ipInfo['providerCode'];
$('#providerName').html(ipInfo['providerName'].toUpperCase());
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script src="./assets/js/jquery.min.js"></script>
<script src="./assets/js/bootstrap.min.js"></script>
<script src="./assets/js/ranges.js?v1.6.7"></script>
<script src="./assets/js/script.js?v1.6.5"></script>
<script src="./assets/js/script.js?v1.6.8"></script>
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
Expand Down Expand Up @@ -70,9 +70,9 @@ <h1>اینترنت برای همه؛ یا هیچ‌کس!</h1>
<div class="clearfix"></div>
<input type="radio" name="forProvider" id="forMtn" value="1" />
<label for="forMtn"><small>رنج‌های متداول</small> ایرانسل</label>
<div class="clearfix"></div>
<!--<div class="clearfix"></div>
<input type="radio" name="forProvider" id="forWarp" value="1" />
<label for="forWarp"><small>رنج‌های متداول</small> Warp</label>
<label for="forWarp"><small>رنج‌های متداول</small> Warp</label>-->
</div>
<div class="input-group scanner">
<input id="download-num" type="number" min="5" max="100" value="10" class="form-control dirLeft" />
Expand Down

0 comments on commit 72decf1

Please sign in to comment.