markevans/onionjs — pull request #14 by pablobm (2014-03-06 22:08:47+00:00)
Title: A CSP may restrict usage of `eval()` and similar

Content Security Policy (CSP) is a security feature implemented in some browsers. Websites can opt-in or ignore it. Among other things, it can be used to tell browsers not to run `eval()` on your pages.

FirefoxOS happens to implement a CSP when running applications on privileged mode (the mode that allows accessing features of the device not available on a web browser). Therefore OnionJS doesn't work there.

This patch detects this problem and proceeds with an alternative.