From ba4253ff8f945b2a8480bc39e0a8098d148d230e Mon Sep 17 00:00:00 2001 From: Julien VAUBOURG Date: Sat, 2 May 2015 16:27:14 +0200 Subject: [PATCH] Autocompleted ipv4 nat prefixes feature implemented --- TODO | 2 -- sources/public/js/custom.js | 9 +++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/TODO b/TODO index f58949b..139b9d5 100644 --- a/TODO +++ b/TODO @@ -2,9 +2,7 @@ * multissid ** WEB: update is_connected_through_hotspot feature -** WEB: autocomplete ipv4 nat prefix (.242, .243, .244, etc) ** WEB: check if ipv6 delgated prefixes and ipv4 nat prefixes are unique ** WEB: fix the now broken wifiparty button ** INIT: differentiate ipv6 and ipv4 in is_dhcpd_running ** INIT: use insserv instead of update-rc.d and update service dependencies -** MISC: update vpnclient/torclient for enabling the user to choose the correct ssid diff --git a/sources/public/js/custom.js b/sources/public/js/custom.js index cc1b69d..b91c54f 100644 --- a/sources/public/js/custom.js +++ b/sources/public/js/custom.js @@ -188,6 +188,15 @@ $(document).ready(function() { if($(this).attr('name').match('dns')) { $(this).val($(this).attr('placeholder')); + } else if($(this).attr('name').match('ip4_nat_prefix')) { + var o1 = parseInt(Math.random() * (255 - 1) + 1); + var o2 = parseInt(Math.random() * (255 - 1) + 1); + + $(this).val('10.' + o1 + '.' + o2); + + } else if($(this).attr('name').match('wifi_ssid')) { + $(this).val('myNeutralNetwork' + (id + 1)); + } else { $(this).val(''); }