Skip to content

SoftAP Setup v3.0 — Browsers!

Choose a tag to compare

@affinity-matrix affinity-matrix released this 22 Sep 05:04
· 72 commits to master since this release

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 browserify

From the softap-setup-js code directory, run:

browserify softap.js -s SoftAPSetup -o softap-browser.js

Example:

<!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.