muxator
9497ee734f
prepare to async: trivial reformatting
...
This change is only cosmetic. Its aim is do make it easier to understand the
async changes that are going to be merged later on. It was extracted from the
original work from Ray Bellis.
To verify that nothing has changed, you can run the following command on each
file touched by this commit:
npm install uglify-es
diff --unified <(uglify-js --beautify bracketize <BEFORE.js>) <(uglify-js --beautify bracketize <AFTER.js>)
This is a complete script that does the same automatically (works from a
mercurial clone):
```bash
#!/usr/bin/env bash
set -eu
REVISION=<THIS_REVISION>
PARENT_REV=$(hg identify --rev "${REVISION}" --template '{p1rev}')
FILE_LIST=$(hg status --no-status --change ${REVISION})
UGLIFYJS="node_modules/uglify-es/bin/uglifyjs"
for FILE_NAME in ${FILE_LIST[@]}; do
echo "Checking ${FILE_NAME}"
diff --unified \
<("${UGLIFYJS}" --beautify bracketize <(hg cat --rev "${PARENT_REV}" "${FILE_NAME}")) \
<("${UGLIFYJS}" --beautify bracketize <(hg cat --rev "${REVISION}" "${FILE_NAME}"))
done
```
2019-02-08 23:20:57 +01:00
muxator
cc23bd18a4
db/API.js: require() Changeset library at top of file
...
Introduced with d246a191c6
("Added option to restore revisions #1791 ") on
2014-11-08.
2019-03-07 00:39:41 +01:00
muxator
06756e49ee
db/API.js: reuse the already required padMessageHandler (2 of 2)
...
It was introduced on 2014-11-12 by commit 9d39c9591a
("update pad clients").
2019-03-07 00:14:49 +01:00
muxator
72260b86de
db/API.js: reuse the already required padMessageHandler (1 of 2)
...
Commit 94cb743ca8
("Fix API call appendChatMessage to send new message to all
connected clients") fixed a bug, but introduced a redundant require().
2019-03-07 00:04:08 +01:00
muxator
10172af199
db/API.js: no need to parseInt(time) here
...
We are already sure that time is an int
2019-03-07 00:02:24 +01:00
muxator
b34fc2de2b
use Date.now() instead of new Date().getTime()
...
This is documented to be more performant.
The substitution was made on frontend code, too (i.e., the one in /static),
because Date.now() is supported since IE 9, and we are life supporting only
IE 11.
Commands:
find . -name *.js | xargs sed --in-place "s/new Date().getTime()/Date.now()/g"
find . -name *.js | xargs sed --in-place "s/(new Date()).getTime()/Date.now()/g"
Not done on jQuery.
2019-02-26 23:25:15 +01:00
muxator
169a06793d
db/API.js: almost removed optional argument handling
...
The HTTP API doesn't ever omit arguments, it always passes `undefined` for a
parameter that wasn't supplied in the request.
The functions that were simplified are:
- getRevisionChangeset()
- getText()
- getHTML()
- saveRevision()
The only function still supporting optional arguments is getPadSafe(), which is
only called from this module.
2019-02-19 00:15:54 +01:00
muxator
b59818676e
db/API.js: early return to make error handling evident. No functional changes
2018-08-29 02:18:32 +02:00
muxator
67ce19eddb
db/API.js: removed unuseful else clause, no functional changes
2018-08-29 02:16:24 +02:00
muxator
610a6db8c8
db/API.js: early return, no functional changes
2018-08-29 02:13:06 +02:00
muxator
fef57efd46
db/API.js: early return, no functional changes
2018-08-29 02:10:45 +02:00
muxator
42bc0a59e1
db/API.js: early return, no functional changes
2018-08-29 02:09:33 +02:00
muxator
05a33f1533
db/API.js, SessionManager: lot of copied & pasted code in integer parsing
...
Replaced with an early return, no functional changes.
2018-08-29 02:08:05 +02:00
muxator
1d45a63864
db/API.js: early return, no functional changes
2018-08-29 01:57:00 +02:00
muxator
30d814d8ed
db/API.js: early return, no functional changes
2018-08-29 01:57:28 +02:00
John McLear
d545630912
fixes #2945
2016-05-28 22:25:44 +01:00
Ted Mielczarek
a675659dc2
Add an appendText API
2015-10-19 15:27:09 -04:00
Andreas Fried
e6b0e954b5
Fix off-by-one: The chatHead is in fact a valid message index.
...
This fixes #2751 .
2015-09-30 00:48:15 +02:00
Stefan
cc9f88e7ed
Merge pull request #2757 from Gared/doc_append_chat_message
...
Add appendChatMessage API to docs
2015-08-30 18:15:51 +02:00
Stefan
f27aacc5bf
Fix missing bracket
2015-08-15 22:41:59 +02:00
Stefan
94cb743ca8
Fix API call appendChatMessage to send new message to all connected clients
2015-08-15 22:05:31 +02:00
Stefan
aa0d14c7d7
Merge branch 'master' of git://github.com/ether/etherpad-lite into create_pad_special_characters
2015-04-11 12:10:37 +02:00
John McLear
32a09ff461
tests and fix up sloppy code by original author
2015-04-01 13:52:56 +01:00
John McLear
c705a058fb
Merge branch 'feature/append-chat-api' of github.com:derosm2/etherpad-lite into append-chat-api
2015-04-01 13:32:07 +01:00
Luc Didry
845788c39d
Add a saveRevision API function
...
Calling saveRevision create an author which name is "API"
2015-02-25 01:04:27 +01:00
Luc Didry
a08c50a77d
Fixes #1870
...
Add two functions to API :
* getSavedRevisionsCount
* listSavedRevisions
2015-02-24 23:42:35 +01:00
Mike DeRosa
4c6bd37286
Adding api call for appending a chat message.
2015-02-09 00:18:12 -05:00
John McLear
4f637befeb
more fixing
2015-01-19 02:59:17 +00:00
John McLear
cadb83ac5a
bumpage
2015-01-19 02:51:32 +00:00
John McLear
cfa3f15f94
Merge pull request #2373 from webzwo0i/avoid-global-vairables
...
dont make local variables global
2014-12-16 00:41:41 +00:00
webzwo0i
5d15f655f0
dont make local variables global
2014-12-14 22:01:28 +01:00
Cristo
f7dd756642
Update API.js
2014-11-12 19:53:56 +01:00
Cristo
f59238fe58
Update API.js
2014-11-12 19:50:43 +01:00
Cristo
24ac082cae
Update API.js
2014-11-12 19:49:08 +01:00
Cristo
9d39c9591a
update pad clients
2014-11-12 19:46:50 +01:00
Stefan
573a912e4f
Add check for special url characters to createPad API function
2014-11-08 17:26:40 +01:00
Cristo
c33c6e085e
comment addded
2014-11-08 01:39:27 +01:00
Cristo
d246a191c6
Added option to restore revisions #1791
2014-11-08 01:12:40 +01:00
Stephan Jauernick
412bdd1857
Renamed the variable to prevent possible problems.
2014-06-01 21:19:15 +02:00
Stephan Jauernick
d42a9eb3a6
Enhanced the Example for the API Method getPadID and make the return value consistent to other functions
2014-05-31 11:53:44 +02:00
Stephan Jauernick
fffdde0c59
Implemented the the new API method getPadID for reversing the Readonly ID. Based on: ff88c19fc1
2014-05-31 00:43:31 +02:00
John McLear
44b1ac2b16
Merge pull request #1984 from ldidry/fix/getRevisionChangeset-crash
...
Fix getRevisionChangeset API call making etherpad crash
2014-05-14 14:10:44 +01:00
Lennart Brinkmann
dd8af99e2e
Add input validation for html param in setHTML()
2013-12-14 21:14:56 +01:00
John McLear
58bbfd8a65
resolve merge conflict
2013-12-09 21:55:04 +00:00
Luc Didry
3d8452b143
Replace tabs indentation with spaces indentation
...
Some files are obviously external libraries, I didn't touch them
2013-12-05 08:41:29 +01:00
s1341
52a99eb9e5
fix bugs, add force option to overwrite destination
2013-11-18 08:25:46 +02:00
s1341
93fcab0461
change parameter names
2013-11-17 21:01:02 +02:00
s1341
29d8bb7716
add pad copy/move API functions
2013-11-17 17:02:44 +00:00
Luc Didry
4a9602cc57
Fix getRevisionChangeset API call making etherpad crash
2013-11-07 22:49:20 +01:00
Eric Schrijver
b34224559d
‘Etherpad Lite’ -> ‘Etherpad’
2013-09-29 13:57:37 +02:00