summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CheckUser/modules/ext.checkuser.cidr.js')
-rw-r--r--CheckUser/modules/ext.checkuser.cidr.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/CheckUser/modules/ext.checkuser.cidr.js b/CheckUser/modules/ext.checkuser.cidr.js
index c305273b..f07bfd15 100644
--- a/CheckUser/modules/ext.checkuser.cidr.js
+++ b/CheckUser/modules/ext.checkuser.cidr.js
@@ -1,6 +1,4 @@
/* -- (c) Aaron Schulz 2009 */
-/*global mediaWiki*/
-
( function ( mw, $ ) {
var showResults = function ( size, cidr ) {
$( '#mw-checkuser-cidr-res' ).val( cidr );
@@ -30,6 +28,8 @@ var updateCIDRresult = function () {
ips = text.split( '\t' );
} else if ( text.indexOf( ',' ) !== -1 ) {
ips = text.split( ',' );
+ } else if ( text.indexOf( ' - ' ) !== -1 ) {
+ ips = text.split( ' - ' );
} else if ( text.indexOf( '-' ) !== -1 ) {
ips = text.split( '-' );
} else if ( text.indexOf( ' ' ) !== -1 ) {
@@ -177,7 +177,7 @@ var updateCIDRresult = function () {
// Build the IP in CIDR form
prefixCidr = binPrefix.length;
// CIDR too small?
- if ( prefixCidr < 96 ) {
+ if ( prefixCidr < 32 ) {
showResults( '!', '>' + Math.pow( 2, 128 - prefixCidr ) );
return; // too big
}
@@ -252,8 +252,8 @@ var hex2int = function ( hex ) {
$( function () {
updateCIDRresult();
- $( '#mw-checkuser-iplist' ).bind( 'keyup click', function () {
+ $( '#mw-checkuser-iplist' ).on( 'keyup click', function () {
updateCIDRresult();
} );
} );
-} )( mediaWiki, jQuery ); \ No newline at end of file
+} )( mediaWiki, jQuery );