not quite finished

pull/1/head
Caleb James DeLisle 10 years ago
parent 0e44b10aeb
commit 84164123b6

1
.gitignore vendored

@ -1,3 +1,4 @@
www/bower_components/*
node_modules
/config.js
customization

@ -142,14 +142,14 @@ console.log("[" + userPass + "] registered");
var sendMsgs = function () {
sendChannelMessage(ctx, chan, msg, function () {
chan.push(client);
try {
ctx.store.getMessages(chan.name, function (msg) {
ctx.store.getMessages(chan.name, function (msg) {
try {
sendMsg(msg, socket);
});
} catch (e) {
console.log(e.stack);
try { socket.close(); } catch (e) { }
}
} catch (e) {
console.log(e.stack);
try { socket.close(); } catch (e) { }
}
});
});
};
if (newChan) {

@ -18,6 +18,7 @@
"tests"
],
"dependencies": {
"markdown": "~0.5.0",
"jquery.sheet": "master",
"jquery": "~2.1.3",
"tweetnacl": "~0.12.2",

@ -0,0 +1,7 @@
define([
'/bower_components/jquery/dist/jquery.min.js'
], function ($) {
var main = function ($toolbar) {
$toolbar.append('<p>Made With <img src="/customize/"> in Paris</p>')
Dt.main($('.rtwysiwyg-toolbar-rightside'));
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 B

@ -3,7 +3,7 @@
<head>
<!--<title>Sample - CKEditor</title>-->
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<link rel="stylesheet" type="text/css" href="index.css" />
<link rel="stylesheet" type="text/css" href="customize/index.css" />
<style>
#whatis {
padding-left: 15%;
@ -33,9 +33,9 @@
</style>
</head>
<body>
<a href="https://github.com/cjdelisle/cryptpad"><img style="position: absolute; top: 0; left: 0; border: 0;" src="https://camo.githubusercontent.com/121cd7cbdc3e4855075ea8b558508b91ac463ac2/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f677265656e5f3030373230302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_left_green_007200.png"></a>
<a href="https://github.com/xwiki-labs/cryptpad"><img style="position: absolute; top: 0; left: 0; border: 0;" src="https://camo.githubusercontent.com/121cd7cbdc3e4855075ea8b558508b91ac463ac2/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f677265656e5f3030373230302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_left_green_007200.png"></a>
<div id="whatis">
<h1>Unity is Strength - Collaboration is Key</h1>
<h1>CryptPad: Unity is Strength - Collaboration is Key</h1>
<p>CryptPad is the <strong>zero knowledge</strong> realtime collaborative editor.
Encryption carried out in your web browser protects the data from the server, the cloud
and the NSA. This project uses the <a href="http://ckeditor.com/">CKEditor</a> Visual Editor and the <a href="https://github.com/xwiki-contrib/chainpad">ChainPad</a> realtime

@ -0,0 +1,6 @@
require([
'/customize/DecorateToolbar.js',
'/bower_components/jquery/dist/jquery.min.js'
], function (Dt, $) {
Dt.main($('.rtwysiwyg-toolbar-rightside'));
});

@ -0,0 +1,18 @@
# Customizing CryptPad
In order allow the content of the main page to be changed and to allow site-specific changes
to the pad and sheet while still keeping the git repository pristine, this directory exists
to allow a set of hooks to be run.
The server is configured to check for a directory called `/customize/` and if that is not
found, to fallback on `/customize.dist/`. In order to customize cryptpad, please **copy**
`/customize.dist/` to `/customize` and then edit it there, this way you will still be able
to pull from (and make pull requests to (!) the git repository.
* pad.js will be run whenever the (CKEditor) **pad** is loaded.
* sheet.js will be run whenever the (JQuery.sheet) **spreadsheet** is loaded.
* index.html is the main page.
All other content which is placed in this directory will be referencable at the `/customize/`
URL location.

@ -58,8 +58,11 @@ published by the Free Software Foundation, either version 3 of the License, or (
any later version. If you wish to use this technology in a proprietary product, please contact
sales@xwiki.com
* Icons thanks to http://www.famfamfam.com/ licensed [Creative Commons Attribution 2.5 License]
[ChainPad]: https://github.com/xwiki-contrib/chainpad
[CKEditor]: http://ckeditor.com/
[fragment identifier]: https://en.wikipedia.org/wiki/Fragment_identifier
[active attack]: https://en.wikipedia.org/wiki/Attack_(computing)#Types_of_attacks
[Creative Commons Attribution 2.5 License]: http://creativecommons.org/licenses/by/2.5/

@ -18,6 +18,14 @@ app.use(Express.static(__dirname + '/www'));
app.use("/bower_components/jquery.sheet/bower_components",
Express.static(__dirname + '/www/bower_components'));
var customize = "/customize";
if (!Fs.existsSync(__dirname + "/customize")) {
customize = "/customize.dist";
console.log("Cryptpad is customizable, see customize.dist/readme.md for details");
}
app.use("/customize/", Express.static(__dirname + customize));
app.get("/", function(req, res) { res.sendfile(__dirname + customize + '/index.html'); });
var httpsOpts;
if (config.privKeyAndCertFiles) {
var privKeyAndCerts = '';

Loading…
Cancel
Save