reworked js sample not to require quotes; brought toSource back for supported platforms (better for binary data), commented out non-base64 data URI because of binary data and so on