Created
November 1, 2012 07:00
-
-
Save yurenju/3992247 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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