John McLear
6cca27dea6
API: getText
with old revision should only return text, not atext
...
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-12-05 18:50:39 -05:00
Richard Hansen
99fae2ec6e
pad: Fix application of padOptions
values from settings.json
2021-12-04 23:06:17 -05:00
Richard Hansen
f8b4189bc4
pad: Always pass strings to pad option callbacks
2021-12-04 23:06:17 -05:00
Richard Hansen
8c857a85ac
pad: Use null
as default for userName
, userColor
options
...
These options are used as strings, so it doesn't make sense to default
them to a boolean value.
Note that this change has no effect due to a bug in how pad options
are processed; that bug will be fixed in a future commit.
2021-12-04 23:06:16 -05:00
Richard Hansen
61b608e264
pad: Use null
as default for lang
option
...
It doesn't make sense to override the browser's language with `en-gb`
by default.
Note that this change has no effect due to a bug in how pad options
are processed; that bug will be fixed in a future commit.
2021-12-04 23:06:16 -05:00
Richard Hansen
7ff71cd41e
pad: Ignore null
values in padOptions
from settings.json
2021-12-04 23:06:16 -05:00
Richard Hansen
f4257a28ba
pad: Delete duplicate decodeURIComponent()
calls
...
`URL.searchParams` already decodes the value.
Also delete some useless comments.
2021-12-04 23:06:09 -05:00
Richard Hansen
6beb5dcaf5
tests: Disable deprecation warnings when testing deprecated functions
2021-11-30 23:17:35 -05:00
Richard Hansen
c4f18a9b3a
padutils: Rename warnWithStack()
to warnDeprecated()
...
This makes it more legitimate for tests to disable the warnings when
testing deprecated functionality.
2021-11-30 23:11:23 -05:00
Richard Hansen
a02e45499d
Use the new AttributeMap and Changeset APIs
2021-11-28 23:47:27 -05:00
Richard Hansen
f00b1ae89b
Merge branch 'master' into develop
2021-11-28 23:10:45 -05:00
Richard Hansen
142a47cbbc
Release v1.8.16
2021-11-28 23:03:58 -05:00
Richard Hansen
77bcb507b3
ImportEtherpad: Limit in-flight DB queries
2021-11-28 22:28:55 -05:00
Richard Hansen
5b3575acf0
ImportEtherpad: Use AttributePool to check attributes
2021-11-28 22:28:55 -05:00
Richard Hansen
19909eae53
ImportEtherpad: Rigorously check imported data
2021-11-28 22:28:55 -05:00
Richard Hansen
885ff3bcde
Pad: Move padLoad
hook invocation to PadManager.js
...
This puts global state change logic with the rest of the global state
management logic. This also makes it possible to create temporary Pad
objects without triggering plugin actions.
2021-11-28 22:28:55 -05:00
Richard Hansen
f7d4abdabe
Pad: Inject the database dependency
2021-11-28 22:28:55 -05:00
Richard Hansen
7c870f8a58
Pad: Add strict validation checks
2021-11-28 22:28:55 -05:00
Richard Hansen
2608a81654
Changeset: Stricter validation checks
2021-11-28 22:28:55 -05:00
Richard Hansen
ad78b24113
ImportEtherpad: Warn about unsupported attrib at encounter
2021-11-28 22:28:55 -05:00
Richard Hansen
23f8a12922
ImportEtherpad: Don't make any changes if data is bad
2021-11-28 22:28:55 -05:00
Richard Hansen
a2e77a7128
ImportEtherpad: Enforce single-pad records
2021-11-28 22:28:54 -05:00
Richard Hansen
33778281b9
ImportEtherpad: Simplify attribute key iteration
2021-11-28 22:28:54 -05:00
Richard Hansen
00fc7c8e86
ImportEtherpad: Reject unknown DB records
2021-11-28 22:27:44 -05:00
Richard Hansen
8e9bc8d325
ImportEtherpad: Avoid false positives when checking apool
2021-11-28 19:00:44 -05:00
Richard Hansen
003e5cbd4b
ImportEtherpad: Fix DB key pad ID transformation
2021-11-28 19:00:44 -05:00
Richard Hansen
fea7948b05
ImportEtherpad: Fix author info processing
2021-11-28 19:00:44 -05:00
Richard Hansen
777d045246
GroupManager: Clean up any mappings when deleting a group
2021-11-28 14:06:47 +00:00
Richard Hansen
5b37a56197
GroupManager: Use .setSub()
and parallel queries to avoid races
...
This also simplfies the code.
2021-11-27 22:20:03 -05:00
Richard Hansen
9d63700da0
SessionManager: Use .setSub()
and parallel queries to avoid races
...
This also simplfies the code.
2021-11-27 22:20:03 -05:00
Timon Engelke
3070cee9ca
Delete group after removing it from the group list
2021-11-27 22:20:03 -05:00
Timon Engelke
09c9e32d72
Delete session after corresponding group2session and author2session
2021-11-27 22:20:03 -05:00
Richard Hansen
2f0561abc0
ImportEtherpad: Remove unnecessary variable
2021-11-25 18:39:07 -05:00
Richard Hansen
9bc90128cb
ImportEtherpad: Fix async logic
2021-11-25 18:39:07 -05:00
webzwo0i
0983985dd5
easysync tests: Split into multiple files
2021-11-23 21:07:08 -05:00
webzwo0i
617515bcbb
easysync tests: Group related tests
2021-11-23 21:07:08 -05:00
webzwo0i
310444f5d3
easysync tests: Rename tests
2021-11-23 21:07:08 -05:00
webzwo0i
ec3833ab66
easysync tests: Convert IIFE into a describe()
2021-11-23 21:07:08 -05:00
Richard Hansen
6a7b54313f
easysync tests: Move shared helper functions to the top
...
This will make it easier to split `easysync.js` into multiple files.
2021-11-23 21:07:08 -05:00
Richard Hansen
d3427240c6
tests: Serve all of src/tests/frontend/
, not just specs
2021-11-23 21:07:07 -05:00
Richard Hansen
89fe40e080
Changeset: Migrate from OpIter
to deserializeOps()
2021-11-23 01:21:49 -05:00
Richard Hansen
0eca0251f2
Changeset: Use a generator to implement OpIter
2021-11-23 01:21:49 -05:00
Richard Hansen
a4aec006dc
Changeset: Turn opIterator()
into a real class
2021-11-23 01:21:12 -05:00
Richard Hansen
86959f7ebc
Changeset: Throw on unexpected chars while iterating ops
2021-11-23 01:21:12 -05:00
Richard Hansen
657492e191
Changeset: Turn newOp()
into a real class
2021-11-23 01:21:12 -05:00
Richard Hansen
fba0bb6dff
Changeset: Turn textLinesMutator()
into a real class
2021-11-23 01:21:12 -05:00
Richard Hansen
dab881139d
Pad: Fix copyPadWithoutHistory
apool corruption bug
2021-11-22 18:40:22 -05:00
Richard Hansen
ed78b56079
tests: Refine copyPadWithoutHistory
tests
2021-11-22 18:40:22 -05:00
Richard Hansen
d74dd235a4
Changeset: Replace appendATextToAssembler()
with a generator
2021-11-22 18:10:37 -05:00
Richard Hansen
9e772df991
deps: Bump dependencies
2021-11-21 21:31:53 -05:00
Richard Hansen
2fc06a0884
Changeset: Add TODO comments for issues noticed
2021-11-21 04:11:41 -05:00
Richard Hansen
f1eb7a25a6
Changeset: Migrate to the new attribute API
2021-11-21 04:11:41 -05:00
Richard Hansen
f40d285109
tests: Refine contentcollector tests
2021-11-21 04:11:41 -05:00
Richard Hansen
1f227200da
Replace separate attrib key, value calls with single pair call
2021-11-21 04:11:41 -05:00
Richard Hansen
6cf2055199
Changeset: New API to simplify attribute processing
2021-11-21 04:11:41 -05:00
Richard Hansen
982d8ad0f2
Changeset: Refactor makeAttribsString
for readability
2021-11-21 04:11:41 -05:00
Richard Hansen
9e7b142bb7
Invert conditions to improve readability
2021-11-21 04:11:41 -05:00
Richard Hansen
93abc31936
changesettracker: Fix author attribute ID fetch
2021-11-21 04:11:41 -05:00
Richard Hansen
d0e74ada2f
changesettracker: Remove unnecessary .numToAttrib
check
2021-11-21 04:11:41 -05:00
Richard Hansen
3ec5e84737
lint: Update ESLint dependencies
2021-11-21 03:34:19 -05:00
snyk-bot
cddd78d892
fix: upgrade formidable from 1.2.2 to 1.2.6
...
Snyk has created this PR to upgrade formidable from 1.2.2 to 1.2.6.
See this package in npm:
https://www.npmjs.com/package/formidable
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-11-21 03:11:38 -05:00
snyk-bot
ff0f81161f
fix: upgrade async from 3.2.1 to 3.2.2
...
Snyk has created this PR to upgrade async from 3.2.1 to 3.2.2.
See this package in npm:
https://www.npmjs.com/package/async
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-11-21 03:06:12 -05:00
snyk-bot
dd9814a4b8
fix: upgrade clean-css from 5.2.1 to 5.2.2
...
Snyk has created this PR to upgrade clean-css from 5.2.1 to 5.2.2.
See this package in npm:
https://www.npmjs.com/package/clean-css
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-11-21 03:04:52 -05:00
snyk-bot
7ed980aa59
fix: upgrade rate-limiter-flexible from 2.3.1 to 2.3.2
...
Snyk has created this PR to upgrade rate-limiter-flexible from 2.3.1 to 2.3.2.
See this package in npm:
https://www.npmjs.com/package/rate-limiter-flexible
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-11-21 03:04:31 -05:00
John McLear
2e19087cb9
bump version
2021-11-20 15:20:35 +00:00
Richard Hansen
ae1741c25b
PadMessageHandler: Add missing parseNum()
for attribute lookup
2021-11-20 01:24:30 -05:00
Richard Hansen
a052580bd1
PadMessageHandler: Stop the USER_CHANGES timer on exception
2021-11-20 01:24:30 -05:00
Richard Hansen
97e382e5d2
PadMessageHandler: Move USER_CHANGES processing inside try
...
This improves the accuracy of the timing stats, and it simplifies
error handling.
2021-11-20 01:24:30 -05:00
Richard Hansen
b1c1501e1e
PadMessageHandler: Use object destructuring
2021-11-20 01:24:30 -05:00
Richard Hansen
e961718ff2
PadMessageHandler: Improve error logging
...
Use a log4js logger instead of `console`, and clean up some of the log
messages.
2021-11-20 01:24:30 -05:00
Richard Hansen
1447ab8899
PadMessageHandler: Factor out common USER_CHANGES error message formatting
2021-11-20 01:24:30 -05:00
Richard Hansen
35b2aeb3b1
PadMessageHandler: Factor out duplicate bad USER_CHANGES handling
...
This also fixes a double-count bug.
2021-11-20 01:24:30 -05:00
Richard Hansen
85919ff914
PadMessageHandler: Replace channels
package with async-friendly class
2021-11-20 01:24:30 -05:00
Richard Hansen
5c1177a3d9
PadMessageHandler: Switch from nodeify to util.callbackify
2021-11-20 01:24:30 -05:00
Richard Hansen
abf4eeeb17
ImportHtml: Wait for HTML processing to complete
2021-11-20 01:24:00 -05:00
Richard Hansen
50dce085c2
ImportHtml: In-line an unnecessary function
2021-11-20 01:24:00 -05:00
Richard Hansen
afdb01681a
ImportHtml: Reuse the HTML processor
2021-11-20 01:24:00 -05:00
Richard Hansen
db105e8650
ImportHtml: Get the logger once
2021-11-20 01:24:00 -05:00
Richard Hansen
6e19d888d3
docs: Check in src/bin/doc/package-lock.json
...
Looks like this was accidentally deleted in commit
4a65acf417
.
2021-11-20 01:09:50 -05:00
Richard Hansen
24b22e3a6d
MinifyWorker: Fix buggy error handling in compressCSS
2021-11-19 02:47:17 -05:00
Richard Hansen
98f0e931fe
MinifyWorker: Promisify compressCSS
2021-11-19 02:47:17 -05:00
Richard Hansen
c94906f1f8
MinifyWorker: Delete unhelpful comment
...
The comment should have been a commit message instead.
2021-11-19 02:47:17 -05:00
Richard Hansen
a65498e849
Changeset: Move SmartOpAssembler.appendOpWithText()
to a standalone function
2021-11-14 04:17:00 -05:00
Richard Hansen
eae814f5a0
pad_utils: New warnWithStack()
function
2021-11-14 04:15:10 -05:00
Richard Hansen
1bbe0d9215
Changeset: Use in
check to help TypeScript narrowing
2021-11-13 17:44:38 -05:00
Richard Hansen
4f4a775d9e
Changeset: Improve handling of missing attribute in old pool
2021-11-13 17:44:38 -05:00
Richard Hansen
b62534a6b2
Changeset: Use Maps to simplify attribute processing
2021-11-13 17:44:38 -05:00
Richard Hansen
9401ae876b
Changeset: Sort attributes by keys, not full string rep
2021-11-13 17:44:38 -05:00
Richard Hansen
1cad5d881a
Changeset: Use for...of
iteration to improve readability
2021-11-13 17:44:38 -05:00
Richard Hansen
6d5b737140
Changeset: Replace .apply()
with spread operator
2021-11-13 17:44:38 -05:00
Richard Hansen
9c17b03660
Changeset: Require Op opcode and attribs to be strings
2021-11-13 17:44:38 -05:00
Richard Hansen
0ae8fb1441
Changeset: Use string concatenation instead of array join
...
People report that string concatenation is faster. Also, I think it's
more readable.
2021-11-13 17:44:38 -05:00
Richard Hansen
097f2623c6
Changeset: Add sanity checks to slicerZipperFunc()
2021-11-13 17:44:38 -05:00
Richard Hansen
efeb69b4ea
Changeset: Simplify slicerZipperFunc()
2021-11-13 17:44:38 -05:00
Richard Hansen
42d4d8269c
Changeset: Refactor appendATextToAssembler()
for readability
2021-11-13 17:44:38 -05:00
Richard Hansen
ca5bdddc59
Changeset: Use break
instead of done
variable
2021-11-13 17:44:38 -05:00
Richard Hansen
44d99733c6
Changeset: Check .hasNext()
before calling .next()
2021-11-13 17:44:38 -05:00
Richard Hansen
1955e7b263
Changeset: Replace output params with return values
...
This improves readability and reduces the chances of introducing a
bug.
2021-11-13 17:44:38 -05:00
Richard Hansen
94f5507671
Changeset: Improve copyOp()
API
...
Use `Object.assign()` to implement `copyOp()`, which simplifies the
code and provides a return value. Also make the second op optional.
2021-11-13 17:44:38 -05:00
Richard Hansen
02ef78e174
Changeset: Make sure opOut
is cleared
...
`slicerZipperFunc()` previously assumed the provided `opOut` argument
was a null Op. Enforce this by clearing it at the beginning.
2021-11-13 17:44:38 -05:00
Richard Hansen
18a6b7279c
Changeset: Only pass strings to parseNum()
2021-11-13 17:44:38 -05:00
Richard Hansen
7ec0d5f385
Changeset: Remove unnecessary linesApplySplice()
2021-11-13 17:44:38 -05:00
Richard Hansen
37bb297e76
Changeset: Improve logged error message
...
I saw this on a production system today and wanted more information.
2021-11-13 17:44:38 -05:00
Richard Hansen
7fa9b07116
Changeset: Invert conditions to improve readability
2021-11-13 17:44:38 -05:00
Richard Hansen
b29e59419e
Changeset: Factor out duplicate code
2021-11-13 17:44:38 -05:00
Richard Hansen
4a65c2c8ff
Changeset: Unexport unnecessarily exported functions
...
These functions aren't used outside of this file.
2021-11-13 17:44:38 -05:00
Richard Hansen
085bc8cbb3
plugins: Don't create .ep_initialized
files
...
These files cause problems with Docker images and read-only
directories/mounts, and they have dubious value (any install-time
setup should instead be done at startup).
2021-11-13 17:43:33 -05:00
Richard Hansen
263105d185
tests: Remove overly aggressive timeouts
2021-11-13 03:05:38 -05:00
Richard Hansen
3c6aef11bd
lint: Add 'use strict';
2021-11-13 03:02:40 -05:00
Richard Hansen
0f7c5a8782
lint: Use window.
to avoid global declaration
2021-11-12 23:45:05 -05:00
Richard Hansen
19e9c2f114
adminsettings: Pay attention to --settings
2021-11-12 23:45:05 -05:00
Richard Hansen
46ad93024d
adminsettings: Promisify
2021-11-12 23:45:05 -05:00
Richard Hansen
4e2f816665
adminsettings: Use object destructuring
2021-11-12 23:45:05 -05:00
Timon Engelke
b0a7237443
Fix comparison between CustomError and string
2021-11-12 23:40:20 +01:00
webzwo0i
8b73b911c9
Changeset: Use string templates
...
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-11-09 01:05:53 +01:00
translatewiki.net
cb95e5907c
Localisation updates from https://translatewiki.net .
2021-11-08 13:04:14 +01:00
Richard Hansen
cc688f7367
ace: Delete dead code
2021-11-07 23:24:39 -05:00
Richard Hansen
5283bfc14a
linestylefilter: Delete unused arguments
2021-11-07 23:24:39 -05:00
Richard Hansen
dd8ec4e291
Changeset: Remove unused lastIndex()
method from op iterator
2021-11-07 23:24:39 -05:00
Richard Hansen
0fd2a46783
Changeset: Remove unused start index parameter for opIterator()
2021-11-07 23:24:39 -05:00
Richard Hansen
43dae4cb1d
Changeset: Delete unused index parameters in applyZip()
2021-11-07 23:24:24 -05:00
Richard Hansen
b3215992c9
changesettracker: Delete IE8 compatibility code
2021-11-07 22:42:31 -05:00
Richard Hansen
9f66ffbc3b
Pad: Delete no-op call to SmartOpAssembler.appendOpWithText()
2021-11-07 22:42:31 -05:00
Richard Hansen
ad6de52eb2
Changeset: More JSDoc comment improvements
2021-11-07 22:42:31 -05:00
Richard Hansen
caefd2184a
PadMessageHandler: Don't fire userLeave
if user hasn't joined yet
2021-11-07 01:30:39 -04:00
snyk-bot
088fb14784
fix: upgrade express-rate-limit from 5.4.1 to 5.5.0
...
Snyk has created this PR to upgrade express-rate-limit from 5.4.1 to 5.5.0.
See this package in npm:
https://www.npmjs.com/package/express-rate-limit
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-11-05 18:17:27 -04:00
Richard Hansen
56cb08f4c5
pad: Pass color and display name in CLIENT_READY
2021-11-05 18:14:27 -04:00
Richard Hansen
7a0d8cb52e
pad: Use URLSearchParams to process search params
...
Also unexport `getUrlVars` because it isn't used outside the file.
2021-11-05 18:14:27 -04:00
Richard Hansen
fe87e2df87
ImportHandler: Pass the pad ID to the import
hook
...
This enables plugins to log the pad ID if desired.
2021-11-05 17:19:54 -04:00
Richard Hansen
caf4e9f28c
ImportHandler: Use truthiness to signal conversion handled
2021-11-05 17:19:54 -04:00
translatewiki.net
cc4772a99e
Localisation updates from https://translatewiki.net .
2021-11-04 13:03:08 +01:00
Richard Hansen
6bf8142221
chat: Translate newly created message entries
2021-11-01 04:56:46 -04:00
Richard Hansen
99b7bdd176
chat: Set timestamp CSS font-size: smaller;
2021-11-01 01:54:29 -04:00
Richard Hansen
51907015ed
chat: Fix gritter duration
2021-11-01 01:54:29 -04:00
Richard Hansen
23f963c9fe
chat: Improve name mention detection
2021-11-01 01:54:29 -04:00
Richard Hansen
26675c5019
chat: New chatNewMessage
server-side hook
2021-11-01 01:54:29 -04:00
Richard Hansen
23a98e5946
tests: Refactor waitForSocketEvent()
to improve readability
2021-11-01 01:54:29 -04:00
Richard Hansen
3132235f2c
tests: Rename getSocketEvent()
to waitForSocketEvent()
2021-11-01 01:54:29 -04:00
Richard Hansen
65bd597053
tests: Move socket.io connection helpers to common.js
2021-11-01 01:54:28 -04:00
Richard Hansen
bea57ff249
tests: Use logger
variable for consistency
2021-11-01 01:54:28 -04:00
Richard Hansen
9fbd2e5c3d
chat: New chatSendMessage
client-side hook
2021-11-01 01:54:28 -04:00
Richard Hansen
4c2f7f9a11
chat: Rename userId
to authorId
, userName
to displayName
2021-11-01 01:54:28 -04:00
Richard Hansen
0f47ca9046
chat: Plumb message object end to end
...
This will make it possible for future commits to add hooks that allow
plugins to augment chat messages with arbitrary metadata.
2021-11-01 01:54:28 -04:00
Richard Hansen
f1f4ed7c58
chat: Allow chatNewMessage
hook to control rendering
2021-11-01 01:54:28 -04:00
Richard Hansen
2597b940f4
chat: Give chatNewMessage
hook access to the raw message object
2021-11-01 01:54:28 -04:00
Richard Hansen
fc5a3f553d
chat: Test processing in chatNewMessage
hook
2021-11-01 01:54:28 -04:00
Richard Hansen
caac4bf711
chat: Promisify addMessage()
2021-11-01 01:54:28 -04:00
Richard Hansen
3f7f629eeb
chat: Scroll down after the chatNewMessage
hook finishes
2021-11-01 01:54:28 -04:00
Richard Hansen
195a6bd81b
chat: Move click handler setup to init()
2021-11-01 01:54:28 -04:00
Richard Hansen
23037280a8
Pad: Simplify getChatMessages()
2021-11-01 01:54:28 -04:00
Richard Hansen
e471cb12e6
tests: Also spy on initially loaded chat messages
2021-11-01 01:54:28 -04:00
Richard Hansen
66a8c48fac
tests: Save the CHAT_MESSAGE payload, not the wrapper
2021-11-01 01:54:28 -04:00
Richard Hansen
c8e0916e1a
tests: Spy on socket.io messages as early as possible
2021-11-01 01:54:28 -04:00
Richard Hansen
e28c9ffc97
tests: Support injecting hook functions during pad load
2021-11-01 01:54:28 -04:00
Richard Hansen
c8e544ec8d
tests: Fix handling of nullish module definitions
2021-11-01 01:54:28 -04:00
Richard Hansen
9aaf781548
PadMessageHandler: Modernize userLeave
hook context properties
2021-10-30 03:07:44 -04:00
Richard Hansen
a6d060d67b
PadMessageHandler: Replace clientReady
hook with new userJoin
hook
2021-10-30 03:07:44 -04:00
Richard Hansen
c98910e1c5
PadMessageHandler: Populate session info as early as possible
2021-10-30 03:07:44 -04:00
Richard Hansen
b7de24c85f
PadMessageHandler: Fix readability of duplicate user check
2021-10-30 03:07:44 -04:00
Richard Hansen
00e7b04518
PadMessageHandler: Improve readability of changeset loading
2021-10-30 03:07:44 -04:00
Richard Hansen
50b9e0df1f
PadMessageHandler: Use values from session info object
...
This is more consistent with the rest of the code, and it provides a
single source of truth.
2021-10-30 03:07:40 -04:00
Richard Hansen
10e930408c
PadMessageHandler: Delete unnecessary CLIENT_READY checks
...
The checks are already performed by the security manager.
2021-10-30 03:06:57 -04:00
Richard Hansen
0992f19570
PadMessageHandler: Improve readability of historical author fetch
2021-10-30 03:06:57 -04:00
Richard Hansen
d36a37d666
PadMessageHandler: Delete unnecessary protocolVersion
...
We can assume that the client code is always in sync with what the
server expects.
2021-10-30 03:06:57 -04:00
Richard Hansen
ce730b0493
PadMessageHandler: Inline createSessionInfoAuth()
...
This function is only used once so it doesn't need to be separate.
2021-10-30 03:06:57 -04:00
Richard Hansen
fa54dc1053
PadMessageHandler: Run the clientReady
hook asynchronously
2021-10-30 03:06:57 -04:00
Richard Hansen
5d30e0b1b2
PadMessageHandler: Run the userLeave
hook asynchronously
2021-10-30 03:06:57 -04:00
Richard Hansen
f2a118b311
PadMessageHandler: Inline unnecessary variables
...
Also delete some unneccessary comments.
2021-10-30 03:06:15 -04:00
Richard Hansen
7522d76c40
PadMessageHandler: Invert condition to improve readability
2021-10-30 03:03:19 -04:00
Richard Hansen
a3b4d985ac
lint: Fix awkward string formatting
2021-10-30 03:03:19 -04:00
Richard Hansen
80e84636d7
pad: Promisify handshake()
2021-10-29 19:38:28 -04:00
Richard Hansen
cd4f5ff281
pad: Defer message handling until handshake completes
2021-10-29 19:37:28 -04:00
Richard Hansen
be0298290d
pad: Move post-handshake code to _afterHandshake()
2021-10-29 19:27:33 -04:00
Richard Hansen
9fb754ce3a
pad: Initialize pad cookie before starting the handshake
2021-10-29 19:27:33 -04:00
Richard Hansen
f6c5ce606e
pad: Move UI setup from handshake()
to init()
2021-10-29 19:27:33 -04:00
Richard Hansen
bd44a87388
pad: Unexport unnecessarily exported handshake()
function
2021-10-29 19:27:33 -04:00
Richard Hansen
5cbbcbcee6
pad: Simplify reload after .etherpad
import
...
The old "switch to pad" logic looked buggy, and it complicates pad
initialization. Forcing a refresh after importing an `.etherpad` file
isn't much of a UX downgrade.
2021-10-29 19:27:33 -04:00
Richard Hansen
e974622561
pad: Use window.
to avoid ESLint error
2021-10-29 19:27:33 -04:00
webzwo0i
d8ca3a693d
timeslider scrollTo: fixes wrong line number calculation in case there
...
are no attribute changes and no length changes
2021-10-29 02:38:29 -04:00
webzwo0i
9bad1d03d3
importHtml: do not add an useless identity changeset
2021-10-29 02:29:45 -04:00
webzwo0i
f7f5e3dad8
setText: prevent adding useless revision in case the pad text did not
...
change
2021-10-29 02:29:45 -04:00
webzwo0i
63de249236
tests: do not re-add identical text with setText
2021-10-29 02:29:45 -04:00
webzwo0i
668d62fa3f
importHtml: avoid race when applying empty document and the import changeset at the same time
2021-10-29 02:29:45 -04:00
snyk-bot
8eb5640cb7
fix: upgrade express-rate-limit from 5.4.0 to 5.4.1
...
Snyk has created this PR to upgrade express-rate-limit from 5.4.0 to 5.4.1.
See this package in npm:
https://www.npmjs.com/package/express-rate-limit
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-29 02:25:09 -04:00
snyk-bot
dd8608fe6e
fix: upgrade rate-limiter-flexible from 2.3.0 to 2.3.1
...
Snyk has created this PR to upgrade rate-limiter-flexible from 2.3.0 to 2.3.1.
See this package in npm:
https://www.npmjs.com/package/rate-limiter-flexible
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-29 02:22:24 -04:00
snyk-bot
cea7eb8ba6
fix: upgrade mime-types from 2.1.32 to 2.1.33
...
Snyk has created this PR to upgrade mime-types from 2.1.32 to 2.1.33.
See this package in npm:
https://www.npmjs.com/package/mime-types
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-26 10:12:27 +00:00
snyk-bot
0d67d05b78
fix: upgrade express-rate-limit from 5.3.0 to 5.4.0
...
Snyk has created this PR to upgrade express-rate-limit from 5.3.0 to 5.4.0.
See this package in npm:
https://www.npmjs.com/package/express-rate-limit
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-25 19:10:13 -04:00
translatewiki.net
2c15ae6ac9
Localisation updates from https://translatewiki.net .
2021-10-25 13:04:22 +02:00
Richard Hansen
de3dfb5ce2
AttributePool: Add JSDoc comments
2021-10-24 21:18:56 -04:00
Richard Hansen
c98b521539
AttributePool: Use ES6 class syntax
2021-10-24 21:18:56 -04:00
webzwo0i
bbc8b29ffd
Changeset: Improve JSDoc comments
...
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-10-24 21:18:56 -04:00
snyk-bot
2c15e68e4a
fix: upgrade clean-css from 5.2.0 to 5.2.1
...
Snyk has created this PR to upgrade clean-css from 5.2.0 to 5.2.1.
See this package in npm:
https://www.npmjs.com/package/clean-css
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-22 07:26:47 +00:00
snyk-bot
41e2ee4848
fix: upgrade rate-limiter-flexible from 2.2.4 to 2.3.0
...
Snyk has created this PR to upgrade rate-limiter-flexible from 2.2.4 to 2.3.0.
See this package in npm:
https://www.npmjs.com/package/rate-limiter-flexible
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-20 08:24:39 +00:00
snyk-bot
ccd7a8d5ff
fix: upgrade threads from 1.6.5 to 1.7.0
...
Snyk has created this PR to upgrade threads from 1.6.5 to 1.7.0.
See this package in npm:
https://www.npmjs.com/package/threads
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-17 02:32:13 -04:00
snyk-bot
1a008ed6fa
fix: upgrade clean-css from 5.1.5 to 5.2.0
...
Snyk has created this PR to upgrade clean-css from 5.1.5 to 5.2.0.
See this package in npm:
https://www.npmjs.com/package/clean-css
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-17 06:17:34 +00:00
Richard Hansen
4f283b64cf
tests: easysync: Inline some functions that are only used once
2021-10-17 00:49:34 +02:00
Richard Hansen
e535129f3c
tests: easysync: Use expect.js
for checks
2021-10-17 00:49:34 +02:00
Richard Hansen
ebb7dfabd7
tests: easysync: Use mocha describe()
and it()
2021-10-17 00:49:34 +02:00
Richard Hansen
2c7d0604c3
tests: easysync: Remove unnecessary Random
class
2021-10-17 00:49:34 +02:00
Richard Hansen
8dd61f847e
tests: easysync: Fix some ESLint errors
2021-10-17 00:49:34 +02:00
Richard Hansen
59a6a9f6a0
tests: easysync: Delete commented-out and unused code
2021-10-17 00:49:34 +02:00
Richard Hansen
428736cdc3
tests: easysync: Run with the frontend tests
2021-10-17 00:49:34 +02:00
snyk-bot
3722d943c7
fix: upgrade terser from 5.8.0 to 5.9.0
...
Snyk has created this PR to upgrade terser from 5.8.0 to 5.9.0.
See this package in npm:
https://www.npmjs.com/package/terser
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-13 07:15:16 +00:00
Richard Hansen
0ea6f1518c
tests: Remove overly agressive timeouts
2021-10-07 20:31:54 -04:00
Richard Hansen
3a5c44c8f7
/jserror: Enable colors to improve readability
2021-10-07 19:55:02 -04:00
Richard Hansen
629e7d5072
/jserror: Log all of the provided data
2021-10-07 19:55:01 -04:00
Richard Hansen
cb01ae8cbb
/jserror: Reject files
2021-10-07 19:55:01 -04:00
Richard Hansen
e909072776
/jserror: Refactor to handle errors better
2021-10-07 19:55:01 -04:00
Richard Hansen
788eb86d84
Ace2Inner: Inline code that is unnecessarily inside an IIFE
2021-10-07 19:53:40 -04:00
Richard Hansen
4890cd8972
Ace2Inner: Delete completed TODO comment
2021-10-07 19:53:40 -04:00
Richard Hansen
a7c78768a1
ExportHelper: Simplify _analyzeLine()
a bit
2021-10-07 19:53:40 -04:00
Richard Hansen
d8cbd134d3
PadMessageHandler: Improve readability
2021-10-07 19:53:40 -04:00
Richard Hansen
019e296c4a
lint: Fix awkward string formatting
2021-10-07 19:53:40 -04:00
Richard Hansen
044f6543a5
lint: Fix ESLint errors (mostly camelcase warnings)
2021-10-07 19:53:40 -04:00
Richard Hansen
34cfff4e4c
Changeset: Delete unused code
2021-10-07 19:53:40 -04:00
Richard Hansen
eb495e9ea2
Changeset: Move out obsolete code
2021-10-07 19:53:40 -04:00
Richard Hansen
2155e216a6
tests: Remove overly agressive timeouts
2021-10-07 19:53:03 -04:00
translatewiki.net
ac3a7191cf
Localisation updates from https://translatewiki.net .
2021-10-07 13:03:04 +02:00
Richard Hansen
a7734ddd94
deps: Update ueberdb2 to 1.4.18
...
This pulls in newer versions of some database drivers which silences
some `npm audit` security warnings.
This also adds support for PostgreSQL connection strings.
2021-10-07 03:58:35 -04:00
snyk-bot
ee610027c0
fix: upgrade terser from 5.7.2 to 5.8.0
...
Snyk has created this PR to upgrade terser from 5.7.2 to 5.8.0.
See this package in npm:
https://www.npmjs.com/package/terser
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-10-05 06:23:36 +00:00
Richard Hansen
e8514db365
tests: Replace manual checks with assert
2021-10-03 20:23:30 -04:00
Richard Hansen
72b12bc97b
tests: Slight backend test reorganization
...
* Delete some useless uses of `describe()`
* Combine some dependent tests
* Rename some tests to avoid duplicate names
2021-10-03 20:06:33 -04:00
Richard Hansen
dd37251da4
tests: Promisify some backend tests
2021-10-03 19:25:50 -04:00
Richard Hansen
39a971e3b9
tests: Remove overly aggressive timeouts
2021-10-03 19:25:50 -04:00
John McLear
c361df52d2
bugfix: Allow selection to start/end before line marker
2021-10-02 02:41:58 -04:00
Richard Hansen
37a33042d2
ace2_inner: Improve rep documentation
2021-10-02 02:10:07 -04:00
Richard Hansen
e42e5457c1
LibreOffice: Improve logging
2021-10-01 03:01:24 -04:00
Richard Hansen
76374bc489
LibreOffice: Close stdin right away
...
This should prevent LibreOffice from hanging if it attempts to read
from stdin (it'll get EOF and probably exit with an error instead).
2021-10-01 03:01:24 -04:00
translatewiki.net
0c31940b09
Localisation updates from https://translatewiki.net .
2021-09-30 13:02:24 +02:00
webzwo0i
4d8ae3475d
Changeset: Add documentation for textLinesMutator()
2021-09-30 12:29:24 +02:00
webzwo0i
0de41ee087
adminsettings test: Fix save detection race condition
...
Use MutationObserver to detect if a saveProgress event was received,
which will trigger an animation.
Before this, `helper.admin$('#response').is(':visible')` was true
after the page loaded and before clicking the Save button, so there
was a possibility that after clicking Save, but before sending the
socketio message to the server, the visibility is checked and returns
true, so the page gets reloaded before the changed settings have been
saved.
2021-09-29 23:49:16 -04:00
webzwo0i
bb0ca91dc2
adminupdateplugins test: swap assertions, increase timeout
2021-09-29 23:49:16 -04:00
webzwo0i
91d3974a0d
adminsettings test: Be a little stricter for some assertions
2021-09-29 23:46:25 -04:00
webzwo0i
cc6fda6916
adminsettings test: Fix restart detection
...
We cannot guarantee that the system time on SauceLabs and Github is in
sync. In case the SauceLabs runner's clock is slow the test would have
failed.
2021-09-29 23:42:41 -04:00
Hossein
0e311184cf
fix: change directory to etherpad root
2021-09-28 19:01:19 -04:00
Richard Hansen
aec619cc0b
log4js: Deprecate the logconfig
setting
...
This will make it possible to upgrade log4js in a future version.
2021-09-28 04:30:26 -04:00
Richard Hansen
b3b6c94b76
log4js: Initialize as early as possible
2021-09-28 04:30:26 -04:00
Richard Hansen
7653dc650d
settings: Use a log4js logger instead of console
2021-09-28 04:30:26 -04:00
Richard Hansen
653dbb3449
tests: Wait for pad init before returning from helper.aNewPad()
...
This should make it easier to avoid race conditions.
2021-09-28 04:18:24 -04:00
Richard Hansen
4d2839457a
CSS: Fix underscore and clear authorship icon alignment
2021-09-26 12:07:56 +02:00
snyk-bot
4637b2b729
fix: upgrade js-cookie from 3.0.0 to 3.0.1
...
Snyk has created this PR to upgrade js-cookie from 3.0.0 to 3.0.1.
See this package in npm:
https://www.npmjs.com/package/js-cookie
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=referral&page=upgrade-pr
2021-09-23 08:10:28 +00:00
Richard Hansen
15f17b5237
tests: Avoid deprecated Builder.withCapabilities()
method
2021-09-15 19:42:11 -04:00
Richard Hansen
73cb698ba0
tests: Update selenium-webdriver to 4.0.0-rc-1
2021-09-15 19:40:47 -04:00
Richard Hansen
70c16bb1b5
tests: Check import of export of read-only pad ID
2021-09-15 18:32:06 -04:00
John McLear
b683dc300d
tests: Check for leak of read-write pad ID when exporting
2021-09-15 18:32:06 -04:00
Richard Hansen
0f5a4bd1f8
tests: Restructure read-only pad export tests
...
This also adds coverage for `.etherpad` exports.
2021-09-15 18:32:06 -04:00
webzwo0i
dbd76f0c5d
export: Don't leak writeable pad ID when exporting
...
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2021-09-15 18:32:06 -04:00
webzwo0i
58bd96ce8f
padreadonly: Remove dead /ro/:id
handling
...
Read-only pads are accessed using `/p/` path since commit
ba3430ebb7
.
2021-09-14 17:07:55 -04:00
translatewiki.net
d58b649c76
Localisation updates from https://translatewiki.net .
2021-09-09 13:02:49 +02:00
Richard Hansen
03275ba227
deps: Regenerate src/package-lock.json
2021-09-06 14:47:11 -04:00
Richard Hansen
59ebaa78fd
deps: Update src/package.json
versions to match lock file
2021-09-06 14:47:11 -04:00
Richard Hansen
ebe05f8e63
deps: Delete unused async-stacktrace
dependency
2021-09-06 14:47:11 -04:00
Richard Hansen
bc9cdd6957
SocketIORouter: Add acknowledgement support
2021-09-06 14:45:26 -04:00
Richard Hansen
9f9adb369b
SocketIORouter: Don't crash if message handler throws
2021-09-06 14:45:26 -04:00
Richard Hansen
320e5c1109
SocketIORouter: Add unit tests
2021-09-06 14:45:26 -04:00
Richard Hansen
94f71bd5e9
SocketIORouter: Add ability to unregister handler
...
This will make it easier to add tests.
2021-09-06 14:45:26 -04:00
Richard Hansen
2e93fca699
SocketIORouter: Logging improvements
2021-09-06 14:45:26 -04:00
Richard Hansen
b9609a749d
SocketIORouter: Rename variables to improve readability
2021-09-06 14:45:26 -04:00
Richard Hansen
4a09000ca6
installDeps.sh: Don't nuke src/node_modules
on error
...
Rationale:
* Clearing out `src/node_modules` is unlikely to bring future
success.
* If there is an error, it's better to leave the filesystem alone so
that the user can investigate the cause.
* Deleting the directory on error is a surprising behavior.
2021-09-05 19:42:29 -04:00
Richard Hansen
2ba85dba0e
installDeps.sh: Handle errors
2021-09-05 19:36:05 -04:00
Richard Hansen
258b8366e2
installDeps.sh: Ensure that ep_etherpad-lite
is a directory
2021-09-05 19:31:06 -04:00
Richard Hansen
cf7cf8be69
installDeps.sh: Quote underquoted expansions
2021-09-05 19:28:58 -04:00
Richard Hansen
8b89cb3f6f
installDeps.sh: Wrap long lines
2021-09-05 19:24:17 -04:00
Richard Hansen
42e59ff2cd
installDeps.sh: Simplify log message
2021-09-05 19:23:01 -04:00
Richard Hansen
348bc0c269
tests: Delete overly aggressive timeouts
...
See https://github.com/ether/etherpad-lite/issues/4988 for rationale.
2021-08-30 02:02:37 -04:00
Richard Hansen
67dfb64095
deps: Bump ueberdb2 to 1.4.15
2021-08-30 01:49:02 -04:00
Richard Hansen
942b686f2d
deps: Bump npm to 6.14.15
2021-08-30 01:22:44 -04:00
Richard Hansen
1e20936b5b
deps: Bump terser to 5.7.2
2021-08-29 23:37:06 -04:00
Richard Hansen
f5657510be
deps: Bump supertest to 6.1.6
2021-08-29 23:37:06 -04:00
Richard Hansen
327989ef0b
deps: Bump superagent to 6.1.0
2021-08-29 23:37:06 -04:00
Richard Hansen
96e66aab17
deps: Bump sinon to 11.1.2
2021-08-29 23:37:06 -04:00
Richard Hansen
c33a2682f9
deps: Bump semver to 7.3.5
2021-08-29 23:37:06 -04:00
Richard Hansen
550c7365c2
deps: Bump openapi-backend to 4.2.0
2021-08-29 23:37:06 -04:00
Richard Hansen
529d2f6b7d
deps: Bump rehype to 10.0.0
2021-08-29 23:37:06 -04:00
Richard Hansen
0accdf0a07
deps: Bump mocha to 9.1.1
2021-08-29 23:37:06 -04:00
Richard Hansen
72b22f7c02
deps: Bump measured-core to 2.0.0
2021-08-29 23:37:06 -04:00
Richard Hansen
7db3e4273d
deps: Bump jsdom to 17.0.0
2021-08-29 23:37:06 -04:00
Richard Hansen
7dbd278d1d
deps: Bump js-cookie to 3.0.0
2021-08-29 23:36:48 -04:00
Richard Hansen
ea43c92fe9
deps: Bump etherpad-cli-client to 0.1.12
2021-08-29 20:02:54 -04:00
Richard Hansen
912e72a8ac
deps: Bump clean-css to 5.1.5
2021-08-29 19:33:03 -04:00
Richard Hansen
3225abc3c7
deps: Bump eslint to 7.32.0
2021-08-29 19:23:43 -04:00
snyk-bot
cca3ba94f9
fix: upgrade async from 3.2.0 to 3.2.1
...
Snyk has created this PR to upgrade async from 3.2.0 to 3.2.1.
See this package in npm:
https://www.npmjs.com/package/async
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-08-27 07:05:25 +00:00
snyk-bot
3c159ef75e
fix: upgrade wtfnode from 0.9.0 to 0.9.1
...
Snyk has created this PR to upgrade wtfnode from 0.9.0 to 0.9.1.
See this package in npm:
https://www.npmjs.com/package/wtfnode
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-08-25 20:34:55 -04:00
Richard Hansen
0d65dc8a44
pad: Add clientVars
to postAceInit
hook context
...
This allows plugins to avoid the `clientVars` global variable.
2021-08-25 14:59:17 -04:00
translatewiki.net
b683cdfe0f
Localisation updates from https://translatewiki.net .
2021-08-23 13:03:03 +02:00
snyk-bot
f08a443497
fix: upgrade rate-limiter-flexible from 2.2.3 to 2.2.4
...
Snyk has created this PR to upgrade rate-limiter-flexible from 2.2.3 to 2.2.4.
See this package in npm:
https://www.npmjs.com/package/rate-limiter-flexible
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-08-19 20:46:38 -04:00
snyk-bot
05182d1d30
fix: upgrade mime-types from 2.1.31 to 2.1.32
...
Snyk has created this PR to upgrade mime-types from 2.1.31 to 2.1.32.
See this package in npm:
https://www.npmjs.com/package/mime-types
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-08-19 07:35:17 +00:00
Richard Hansen
fed950e809
ace2_inner: Simplify handler for Ctrl-@ (show authors)
2021-08-16 00:34:30 -04:00
Richard Hansen
88057eade2
ace2_inner: Readability improvements
2021-08-16 00:34:30 -04:00
Richard Hansen
bc6428025a
ace2_inner: Use for..of iteration to improve readability
2021-08-16 00:34:30 -04:00
Richard Hansen
f06307cb4c
ace2_inner: Fix for..in iteration
...
See commit c38c34bef4
.
2021-08-16 00:34:30 -04:00
Richard Hansen
2d50a8aa95
ace2_inner: Fix efficiency of rangeForLine()
...
Returning `true` or `false` has no effect when iterating using
`Array.prototype.forEach`. This fixes a bug introduced in commit
b28bfe8e31
.
2021-08-16 00:34:30 -04:00
Richard Hansen
ca2e008e7b
ace2_inner: Move variable declarations to appropriate scope
2021-08-16 00:34:30 -04:00
Richard Hansen
bf10e70f2e
ace2_inner: Delete unnecessary currentLine
variable
2021-08-16 00:34:30 -04:00
Richard Hansen
9fc613d362
ace2_inner: Delete unnecessary checks
2021-08-16 00:34:30 -04:00
Richard Hansen
a5f9c60a34
ace2_inner: Operate on Elements, not Nodes
2021-08-16 00:34:30 -04:00
Richard Hansen
aad75e4661
ace2_inner: Factor out duplicate line number div creation
2021-08-16 00:34:30 -04:00
Richard Hansen
3237f8d123
ace2_inner: Simplify iteration over line number divs
2021-08-16 00:34:30 -04:00
Richard Hansen
b238d9610a
ace2_inner: Factor out duplicate line height application
2021-08-16 00:34:30 -04:00
Richard Hansen
1b890e3d4d
ace2_inner: Replace lineNumbersShown
with number of children
2021-08-16 00:34:30 -04:00
Richard Hansen
27363bf729
ace2_inner: Add line number divs directly, not via fragment
...
There's no layout thrashing so the fragment doesn't provide any
benefit.
2021-08-16 00:34:30 -04:00
Richard Hansen
e1a024847c
ace2_inner: Delete unnecessary innerdocbody
variable
2021-08-16 00:34:30 -04:00
Richard Hansen
7d807d2fc5
ace2_inner: Delete unnecessary container
variable
2021-08-16 00:34:30 -04:00
Richard Hansen
4b4584c264
ace2_inner: Delete unnecessary doc
and root
variables
2021-08-16 00:34:25 -04:00
Richard Hansen
ec63c15a40
ace2_inner: Simplify document body selection
2021-08-16 00:31:09 -04:00
Richard Hansen
11c86e677a
ace2_inner: Consistently use outerWin
and outerDoc
2021-08-16 00:31:09 -04:00
Richard Hansen
98c1ba5808
ace2_inner: Use destructuring assignment to simplify
2021-08-16 00:31:09 -04:00
Richard Hansen
c7be4f9d2d
ace2_inner: Move sidedivinner
creation to ace.js
2021-08-16 00:31:09 -04:00
Richard Hansen
15b1d4cb75
ace2_inner: Build sidedivinner
programmatically
2021-08-16 00:31:09 -04:00
Richard Hansen
b80295c228
ace2_inner: Combine declaration and initialization
2021-08-16 00:31:09 -04:00
Richard Hansen
7a8edc816b
ace2_inner: Replace initLineNumbers()
with an IIFE
2021-08-16 00:31:09 -04:00
Richard Hansen
b5bfff43cf
ace2_inner: Delete redundant class assignment
2021-08-16 00:31:08 -04:00
Richard Hansen
e581ee01f2
ace2_inner: Formatting improvements
2021-08-16 00:30:50 -04:00
Richard Hansen
0ca5a3459f
Timeslider: Install an error handler
2021-08-14 07:44:05 -04:00
Richard Hansen
1e22e0102d
Timeslider: Move <title>
and <script>
inside <head>
2021-08-14 07:44:05 -04:00
Richard Hansen
b6fba9d66d
Pad: Improve page load error handler
...
* Install the error handler early.
* Include stack trace.
* Remove unnecessary escaping.
* Improve formatting.
* Move to a separate script file.
2021-08-14 07:44:05 -04:00
Richard Hansen
d4e74fd038
Pad: Add missing <head>
and <body>
tags
...
The comment "head and body had been removed intentionally" implies
that the tags were causing some sort of problem, but the commit that
removed them (57075d1545
) didn't provide
any rationale. I'm assuming it was a mistake.
2021-08-14 07:44:05 -04:00
Richard Hansen
4a1f21ce34
pad_editbar: Convert snake case to camel case
2021-08-14 07:26:31 -04:00
Richard Hansen
5478d2ce60
pad_editbar: Use ES6 class syntax for readability
2021-08-14 07:26:31 -04:00
Richard Hansen
97ccf9e082
pad_editbar: Factor out duplicate code
2021-08-14 07:08:57 -04:00
Richard Hansen
ee41de4809
pad_editbar: Deprecate the toggleDropDown
callback
2021-08-14 07:08:57 -04:00
Richard Hansen
c629ee09a8
pad_editbar: Call the callback asynchronously
...
This follows JavaScript best practices.
2021-08-14 07:08:57 -04:00
Richard Hansen
148e10821b
pad_editbar: Always call the callback
2021-08-14 07:08:57 -04:00
Richard Hansen
07e05a92eb
pad_editbar: Call the callback after all work is done
2021-08-14 07:08:57 -04:00
Richard Hansen
a1b924f746
pad_editbar: Don't pass a callback to toggleDropDown()
...
The function is synchronous so there's no point.
2021-08-14 07:08:57 -04:00
Richard Hansen
59d6a8b321
pad_editbar: Delete unnecessary returned
variable
2021-08-14 07:01:50 -04:00
Richard Hansen
a4652d67a0
pad_editbar: Move commands
up for readability
2021-08-14 07:01:50 -04:00
Richard Hansen
fda34407f9
pad_editbar: Move dropdowns
initialization to constructor
...
This avoids null dereference if a buggy caller calls
`toggleDropDown('none')` before `init()`. (Ideally the caller would be
fixed, but this is not always feasible.)
2021-08-14 07:01:34 -04:00
Richard Hansen
42b0b1bf00
pad_editbar: Move syncAnimation
out of padeditbar
IIFE
...
This avoids the need for an IIFE.
2021-08-14 07:01:13 -04:00
Richard Hansen
ee996f530f
pad_editbar: Remove unnecessary syncAnimationFn
variable
2021-08-14 07:01:13 -04:00
Richard Hansen
4b4eef5f4a
pad_editbar: Convert registerDefaultCommands()
into a method
2021-08-14 07:01:13 -04:00
Richard Hansen
0d4f147349
pad_editbar: Simplify iteration
2021-08-14 07:01:13 -04:00
Richard Hansen
11faf6104a
pad_editbar: Convert bodyKeyEvent()
into a method
2021-08-14 07:01:13 -04:00
Richard Hansen
b2fe6e3e7e
pad_editbar: Fix invalid use of this
2021-08-14 07:01:12 -04:00
Richard Hansen
b884628a5a
pad_editbar: Use arrow functions for callbacks, IIFEs
2021-08-14 07:01:12 -04:00
Richard Hansen
bdaa66c346
pad_editbar: Use this
instead of self
2021-08-14 07:01:12 -04:00
Richard Hansen
118c66e5d0
HTML import: Improve log message for invalid HTML
2021-08-12 13:53:23 -04:00
Richard Hansen
c816c20bc7
HTML import: Replace cheerio with jsdom to simplify contentcollector
...
Cheerio provides jQuery-like objects but they wrap DOM Node-like
objects that are not 100% API compatible with the DOM spec. Because of
this, contentcollector, which is used in browsers and in Node.js
during HTML import, has until now needed to support two different
APIs. This commit modifies HTML import to use jsdom instead of cheerio
and simplifies contentcollector.
2021-08-12 13:53:23 -04:00
Volker Bijewitz
84d6d277d7
Accessibility fix for JAWS screen readers
...
ace.js: removed the role 'application' from innerDocument.body. JAWS
do not read any text from the edit lines if this role is set.
domline.createDomLine: to give JAWS the ability to read the lines
correctly, it is required to set the attribute 'aria-live' to
'assertive'.
2021-08-12 13:48:08 -04:00
Richard Hansen
15995acc2a
deps: Bump require-kernel and yajsml
...
This brings improvements to the readability of stack traces,
especially in Firefox.
2021-08-09 19:04:42 -04:00
translatewiki.net
9eadd9988f
Localisation updates from https://translatewiki.net .
2021-08-09 13:03:33 +02:00
snyk-bot
33a43b7082
fix: upgrade rate-limiter-flexible from 2.2.2 to 2.2.3
...
Snyk has created this PR to upgrade rate-limiter-flexible from 2.2.2 to 2.2.3.
See this package in npm:
https://www.npmjs.com/package/rate-limiter-flexible
See this project in Snyk:
https://app.snyk.io/org/johnmclear/project/d9a12bfb-7ccd-443f-9e22-f30d339cc8c5?utm_source=github&utm_medium=upgrade-pr
2021-08-02 20:43:44 -04:00
translatewiki.net
fd4fb8874e
Localisation updates from https://translatewiki.net .
2021-08-02 13:02:54 +02:00
webzwo0i
e61888dfe2
ace.js: Don't use srcdoc when creating iframes (see #4975 )
...
Using srcdoc, especially with multiple nested iframes, seems to be
problematic when using `self` in CSP policies.
2021-07-30 03:51:57 -04:00
Richard Hansen
9fda5adcef
ace2_inner.js: Improve discovery of sidediv
and linemetricsdiv
...
The `Node.nextSibling` property returns the next Node, not the next
Element. If whitespace, an HTML comment, or any other type of
non-Element Node is ever introduced between the Elements then
`.nextSibling` no longer returns the desired Element. Switching to
`Element.nextElementSibling` would work, but finding the Elements by
ID is more readable and future-proof.
2021-07-30 03:51:56 -04:00
Richard Hansen
0c963a817a
ace2_inner.js: Delete unnecessary ace_outerWin
variable
2021-07-30 03:51:56 -04:00
Richard Hansen
8d869ec927
Pad: Delete non-functional debug logging facility
2021-07-30 03:50:23 -04:00
Richard Hansen
5d39a57507
Pad: Delete dead ace_getFormattedCode()
2021-07-30 03:49:35 -04:00
Richard Hansen
c3af70e5a5
deps: Bump ueberdb2 to 1.4.13
2021-07-30 03:48:36 -04:00
translatewiki.net
2dbcd00dc6
Localisation updates from https://translatewiki.net .
2021-07-29 13:03:26 +02:00