rand fixed

This commit is contained in:
Caleb James DeLisle 2014-10-31 17:05:09 +01:00
parent 1d9ebe8c93
commit b6523adb1f
2 changed files with 18 additions and 3 deletions

View File

@ -4,7 +4,7 @@ Unity is Strength - Collaboration is Key
![and_so_it_begins.png](https://github.com/cjdelisle/cryptpad/raw/master/and_so_it_begins.png "We are the 99%") ![and_so_it_begins.png](https://github.com/cjdelisle/cryptpad/raw/master/and_so_it_begins.png "We are the 99%")
CryptPad is a **zero knowledge** realtime collaborative editor. CryptPad is the **zero knowledge** realtime collaborative editor.
Encryption carried out in your web browser protects the data from the server, the cloud Encryption carried out in your web browser protects the data from the server, the cloud
and the NSA. This project uses the [CKEditor] Visual Editor and the [ChainPad] realtime and the NSA. This project uses the [CKEditor] Visual Editor and the [ChainPad] realtime
engine. The secret key is stored in the URL [fragment identifier] which is never sent to engine. The secret key is stored in the URL [fragment identifier] which is never sent to

View File

@ -8,6 +8,21 @@ define([
var Nacl = window.nacl; var Nacl = window.nacl;
var $ = jQuery; var $ = jQuery;
var INITIAL_STATE = [
'<p>',
'This is <strong>CryptPad</strong>, the zero knowledge realtime collaborative editor.',
'<br>',
'What you type here is encrypted so only people who have the link can access it.',
'<br>',
'Even the server cannot see what you type.',
'</p>',
'<p>',
'<small>',
'<i>What you see here, what you hear here, when you leave here, let it stay here</i>',
'</small>',
'</p>',
].join('');
var module = { exports: {} }; var module = { exports: {} };
var parseKey = function (str) { var parseKey = function (str) {
@ -36,9 +51,9 @@ define([
removeButtons: 'Source,Maximize', removeButtons: 'Source,Maximize',
}); });
editor.on('instanceReady', function () { editor.on('instanceReady', function () {
//editor.execCommand('maximize'); editor.execCommand('maximize');
var ifr = window.ifr = $('iframe')[0]; var ifr = window.ifr = $('iframe')[0];
ifr.contentDocument.body.innerHTML = '<p>It works!</p>'; ifr.contentDocument.body.innerHTML = INITIAL_STATE;
var rtw = var rtw =
RTWysiwyg.start(window.location.href.replace(/#.*$/, '').replace(/^http/, 'ws'), RTWysiwyg.start(window.location.href.replace(/#.*$/, '').replace(/^http/, 'ws'),