Note that for development, you should always be using the staging server, which uses a self-signed ssl certificate. By default, your browser will reject this certificate as insecure. Therefore, in order to register or send and receive messages of any kind, you must first visit https://textsecure-service-staging.whispersystems.org/ in a new tab and click through the warnings to allow the certificate. If at any time you notice a console error about an "INSECURE RESPONSE" or "Handshake was canceled", repeat this step.
Once that's done, in the extension's options page, you can register for TextSecure:
You should now be able to use the extension. If you need to re-register, open a
browser console within the extension options page (or inspect
background.html
) and execute localStorage.clear()
to delete your account
information.
Don't have any friends to help you test the extension? Make a couple of chrome profiles. Each one will need its own google account and google voice number. Each one will have to repeat the setup process documented above, including re-accepting the staging server cert under each profile. This is a tedious process, but once you are done you will be able to send messages back and forth between different profiles, allowing you to observe both endpoints of a conversation.
So you wanna make a pull request? Please observe the following guidelines.
Note: Unless you need to make changes to dependencies, you can skip this section and just use the checked in versions.
Dependencies are managed by bower and built with
grunt. To change them, you'll need to install node and
npm, then run npm install
to install bower, grunt, and related plugins.
Add the package name and version to bower.json under 'dependencies' or bower
install package-name --save
Next update the "preen" config in bower.json with the list of files we will actually use from the new package, e.g.:
"preen": {
"package-name": [
"path/to/main.js",
"directory/**/*.js"
],
...
}
If you'd like to add the new dependency to js/components.js to be included on
all html pages, simply append the package name to the concat.app list in
bower.json
. Take care to insert it in the order you would like it
concatenated.
Now, run grunt
to delete unused package files and build js/components.js
.
Finally, stage and commit changes to bower.json, js/components.js
,
and components/
. The latter should be limited to files we actually use.
Please write tests! Our testing framework is mocha and our assertion library is chai.
To run tests, open test/index.html
in your browser. Note that
chrome-extension://
namespace (as opposed to
the file://
namespace or via a local webserver.