mediawiki-extensions-Visual.../lib/Base64.js
Ed Sanders 288da5b704 Compress HTML data with deflate before POSTing
Bug: 66914
Change-Id: I7b0a9cfd4d4c10986769a868884688ffca833cb6
2014-06-24 17:39:03 +01:00
..
base64.js
LICENSE
README.md

Base64.js

≈ 500 byte* polyfill for browsers which don't provide window.btoa and window.atob.

Although the script does no harm in browsers which do provide these functions, a conditional script loader such as yepnope can prevent unnecessary HTTP requests.

yepnope({
  test: window.btoa && window.atob,
  nope: 'base64.js',
  callback: function () {
    // `btoa` and `atob` are now safe to use
  }
})

Base64.js stems from a gist by yahiko.

Running the test suite

make setup
make test

* Minified and gzipped. Run make bytes to verify.