diff --git a/bin/cleanRun.sh b/bin/cleanRun.sh new file mode 100755 index 000000000..55bcf8a75 --- /dev/null +++ b/bin/cleanRun.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +#Move to the folder where ep-lite is installed +cd `dirname $0` + +#Was this script started in the bin folder? if yes move out +if [ -d "../bin" ]; then + cd "../" +fi + +ignoreRoot=0 +for ARG in $* +do + if [ "$ARG" = "--root" ]; then + ignoreRoot=1 + fi +done + +#Stop the script if its started as root +if [ "$(id -u)" -eq 0 ] && [ $ignoreRoot -eq 0 ]; then + echo "You shouldn't start Etherpad as root!" + echo "Please type 'Etherpad rocks my socks' or supply the '--root' argument if you still want to start it as root" + read rocks + if [ ! $rocks = "Etherpad rocks my socks" ] + then + echo "Your input was incorrect" + exit 1 + fi +fi + +#Clean the current environment +rm -rf src/node_modules + +#Prepare the enviroment +bin/installDeps.sh $* || exit 1 + +#Move to the node folder and start +echo "Started Etherpad..." + +SCRIPTPATH=`pwd -P` +node $SCRIPTPATH/node_modules/ep_etherpad-lite/node/server.js $* diff --git a/doc/api/hooks_client-side.md b/doc/api/hooks_client-side.md index f9ad9147c..aa027337d 100644 --- a/doc/api/hooks_client-side.md +++ b/doc/api/hooks_client-side.md @@ -198,7 +198,7 @@ Things in context: 1. cc - the contentcollector object 2. state - the current state of the change being made 3. tname - the tag name of this node currently being processed -4. style - the style applied to the node (probably CSS) +4. styl - the style applied to the node (probably CSS) -- Note the typo 5. cls - the HTML class string of the node This hook is called before the content of a node is collected by the usual methods. The cc object can be used to do a bunch of things that modify the content of the pad. See, for example, the heading1 plugin for etherpad original. diff --git a/settings.json.template b/settings.json.template index 39c383eda..7d9c62cc6 100644 --- a/settings.json.template +++ b/settings.json.template @@ -25,6 +25,7 @@ "ssl" : { "key" : "/path-to-your/epl-server.key", "cert" : "/path-to-your/epl-server.crt" + "ca": ["/path-to-your/epl-intermediate-cert1.crt", "/path-to-your/epl-intermediate-cert2.crt"] }, */ diff --git a/src/node/hooks/express/main.js b/src/node/hooks/express/main.js index ee696b6a0..04ce95e8f 100644 --- a/src/node/hooks/express/main.js +++ b/src/node/hooks/express/main.js @@ -46,6 +46,13 @@ exports.restartServer = function () { key: fs.readFileSync( settings.ssl.key ), cert: fs.readFileSync( settings.ssl.cert ) }; + if (settings.ssl.ca) { + options.ca = []; + for(var i = 0; i < settings.ssl.ca.length; i++) { + var caFileName = settings.ssl.ca[i]; + options.ca.push(fs.readFileSync(caFileName)); + } + } var https = require('https'); server = https.createServer(options, app); @@ -62,6 +69,9 @@ exports.restartServer = function () { res.header("Strict-Transport-Security", "max-age=31536000; includeSubDomains"); } + // Stop IE going into compatability mode + // https://github.com/ether/etherpad-lite/issues/2547 + res.header("X-UA-Compatible", "IE=Edge,chrome=1"); res.header("Server", serverName); next(); }); diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 6e1e6299d..3e2ee7f86 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -719,6 +719,15 @@ define(["ep_etherpad-lite/static/js/rjquery", "underscore", 'ep_etherpad-lite/st { throw new Error("mismatch error setting raw text in importText"); } + + // Chrome can't handle the truth.. If CSS rule white-space:pre-wrap + // is true then any paste event will insert two lines.. + // Sadly this will mean you get a walking Caret in Chrome when clicking on a URL + // So this has to be set to pre-wrap ;( + // We need to file a bug w/ the Chromium team. + if(browser.chrome){ + $("#innerdocbody, body.doesWrap > div").css({"white-space":"pre-wrap"}); + } } function importAText(atext, apoolJsonObj, undoable)