diff --git a/README.md b/README.md index c65154d0..86d7e1a9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,10 @@ -# Requirements +# Usage + +**Easy preview**: Simple changes in the texts can be previewed live on bitcoin.org with any recent browser. You only need to click anywhere on the page and hold your mouse button for one second. You'll then be able to edit the page just like a document. Changes will be lost as soon as the page is refreshed. + +**Real preview**: Install dependencies, edit the files, run jekyll (or "jekyll build" on older setups), and copy the output files from _site/ at the root of your web server. If you have no web server, run jekyll --server (or "jekyll serve" on older setups). This server requires you to add a trailing ".html" by hand in your browser window. + +## Requirements Installing dependencies on Ubuntu 12.10 @@ -10,13 +16,6 @@ Installing dependencies on older Ubuntu and Debian distributions sudo apt-get install rubygems ruby1.9.1-dev build-essential sudo gem install jekyll json less therubyracer ffi-icu -# Usage - -* Run jekyll (or "jekyll build" on older setups) -* Output will be in \_site/ - -If you have no http server, you can run jekyll --server (or "jekyll serve" on older setups). This server does not support clean urls and requires you to add a trailing ".html" by hand in your browser window. - ## Translation ### How to translate diff --git a/js/main.js b/js/main.js index fb460f23..1c515a62 100644 --- a/js/main.js +++ b/js/main.js @@ -1,3 +1,9 @@ +function addEvent(a,b,c){return (a.addEventListener)?a.addEventListener(b,c,false):(a.attachEvent)?a.attachEvent('on'+b,c):false;} + + +function removeEvent(a,b,c){return (a.removeEventListener)?a.removeEventListener(b,c,false):(a.detachEvent)?a.detachEvent('on'+b,c):false;} + + function cancelEvent(e){if(!e)var e=window.event;(e.preventDefault)?e.preventDefault():e.returnValue=false;} @@ -206,3 +212,36 @@ function freenodeShow(e){ document.getElementById('chatbox').innerHTML='