SoftAP Setup v3.0 — Browsers!
Browsers, Browsers, Browsers!
This release includes a major refactor by @brewnerd which enables the easy browserification of the library via browserify. His generous contribution also includes an example of browser-based usage. Excerpt below:
Browserify
Install browserify:
npm install -g browserifyFrom the softap-setup-js code directory, run:
browserify softap.js -s SoftAPSetup -o softap-browser.jsExample:
<!doctype html>
<html lang="en">
<head></head>
<body>
<script src="softap-browser.js"></script>
<script>
var sap = new SoftAPSetup();
sap.deviceInfo(callback);
function callback(err, dat) {
if (err) { throw err; }
console.log("Device ID: %s, claimed: %s", dat.id, dat.claimed ? "yes" : "no");
};
</script>
</body>
</html>If you find this release useful, don't hesitate to thank @brewnerd for the awesome work! 🎉
CORS Bugfix
Thanks to a contribution by @indraastra, POST requests are now sent without an OPTIONS 'preflight' request.