merge script.js from master to sqlite3

This merges the updates to script.js within the master branch into
sqlite3 branch to cure javascript errors. This is a direct copy of the
current master file.