Browse Source

Autocompleted ipv4 nat prefixes feature implemented

Julien VAUBOURG 10 years ago
parent
commit
ba4253ff8f
2 changed files with 9 additions and 2 deletions
  1. 0 2
      TODO
  2. 9 0
      sources/public/js/custom.js

+ 0 - 2
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

+ 9 - 0
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('');
       }