Skip to content

Instantly share code, notes, and snippets.

@yurenju
Created November 1, 2012 07:00
Show Gist options
  • Save yurenju/3992247 to your computer and use it in GitHub Desktop.
Save yurenju/3992247 to your computer and use it in GitHub Desktop.
function(ssid) {
var manager = window.navigator.mozWifiManager;
var req = manager.getNetworks();
req.onsuccess = function onScanSuccess() {
var networks = req.result;
for (var i = 0; i < networks.length; i++) {
if (networks[i].ssid === ssid) {
manager.associate(networks[i]);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment