samp.js is a javascript client library for web applications that want to use SAMP, the Simple Application Messaging Protocol.
It is currently distributed and documented from a github site belonging to astro.js. See www.astrojs.org or go directly to the github sampjs documentation or repository pages.
I have also done some experimental work to get SAMP working over HTTPS (which is a whole different ball game to doing it over HTTP). For information and examples of that, see this SAMP for HTTP and HTTPS page, or sampload for a much simpler but less capable approach.