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
translatewiki.net
a9c6ed8701
Localisation updates from https://translatewiki.net .
2021-07-26 13:03:49 +02:00
Richard Hansen
d723270388
tests: Improve readability of multipleUsers.js
...
* Define utility functions above their use to silence lint warnings.
* Use `.css()` instead of `.attr('style')` to manipulate style.
* Pass an object to `.attr()` rather than call once per attribute.
* Take advantage of chaining.
* Inline unnecessary `padUrl` variable.
* Delete some unnecessary comments.
2021-07-25 02:23:50 +02:00
Richard Hansen
ff39eeafca
tests: Factor out duplicate getFrameJQuery()
2021-07-25 02:23:50 +02:00
Richard Hansen
42026ff771
tests: Add a comment explaining why Promise.all()
is not used
2021-07-25 02:23:50 +02:00
Richard Hansen
01184cd1aa
tests: Remove unnecessary includeJquery
parameter
2021-07-25 02:23:50 +02:00
snyk-bot
4a670e96ab
fix: upgrade express-rate-limit from 5.2.6 to 5.3.0
...
Snyk has created this PR to upgrade express-rate-limit from 5.2.6 to 5.3.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=upgrade-pr
2021-07-23 04:22:23 +00:00
Richard Hansen
c83bb058d1
PadMessageHandler: Fix stats null dereference
...
It is possible for the stats to be read before the
`expressCreateServer` hook is called (in particular: when there is an
error during startup), which is when the `socketio` variable is set.
Check for non-null `socketio` before attempting to count the number of
socket.io connections.
2021-07-22 13:07:03 -04:00
translatewiki.net
3d80409236
Localisation updates from https://translatewiki.net .
2021-07-22 13:03:00 +02:00
webzwo0i
62093adce5
tests: refactor inclusion of jquery and sendkeys via script tags
...
Readability is increased by explicitly checking if jquery/sendkeys was
already loaded before evaluating it in the context of ace_inner and the
enclosing container (pad.html). Note that sendkeys is no longer
evaluated in the context of ace_outer, as this isn't needed
Also removes some IE 8/9 legacy code
2021-07-21 01:53:05 +02:00
Richard Hansen
4ceb3ca4c8
Chat: Allow Shift-Enter to insert a newline
2021-07-19 23:44:33 +02:00
Richard Hansen
cf86ae8b63
Chat: Use KeyboardEvent.key
instead of deprecated .which
2021-07-19 23:44:33 +02:00
Richard Hansen
faf84f0143
Chat: Display whitespace in chat messages
2021-07-19 23:44:33 +02:00
Richard Hansen
834e05fc9c
Chat: Use a <textarea>
for message input
2021-07-19 23:44:33 +02:00
Richard Hansen
ce5ef9350f
tests: sendkeys: Fix {enter}
keypress event
2021-07-19 23:44:33 +02:00
translatewiki.net
c6f643dd75
Localisation updates from https://translatewiki.net .
2021-07-19 13:02:46 +02:00
Xavier Mehrenberger
ca4cc2d7c0
Fix settings.useMonospaceFontGlobal
...
When settings.useMonospaceFontGlobal is set to `true`, it sets the default
font to 'monospace'. This font seems to have been removed in
a5164dad43
.
This commit sets the default font to "RobotoMono" which is a valid
option.
Tested in a Docker environment, setting `PAD_OPTIONS_USE_MONOSPACE_FONT`
to `true`
Signed-off-by: Xavier Mehrenberger <xavier.mehrenberger@gmail.com>
2021-07-14 04:33:38 -04:00
Richard Hansen
336d48add7
Add support for square brackets in URLs
...
This reverts commit 9022877cc6
.
2021-07-10 22:22:31 -04:00
Richard Hansen
09f8ffbdb6
deps: Bump ueberdb2 to 1.4.11
2021-07-10 18:26:31 -04:00
Richard Hansen
5f39a1ee7f
CSS: Underline links in error dialogs
...
Underlining was removed for unknown reasons by commit
d872b42e31
.
2021-07-09 18:43:13 -04:00
webzwo0i
a634bd8ee1
bump version
2021-07-04 07:05:34 +02:00
translatewiki.net
197e04ecd7
Localisation updates from https://translatewiki.net .
2021-07-01 13:42:31 +02:00
Richard Hansen
3d40ab7e8c
CSS: Move author color padding to setAuthorStyle()
...
This prevents the padding from clashing with plugins that use the
`aceSetAuthorStyle` hook.
2021-06-22 14:43:22 -04:00
translatewiki.net
2745557127
Localisation updates from https://translatewiki.net .
2021-06-21 12:28:27 +02:00
Richard Hansen
9fcd86b3cd
Pad: Fix <script>
elements in aceInitInnerdocbodyHead
hook
...
Using `.innerHTML` to create a `<script>` element does create a DOM
node, but the script is not actually executed. Fortunately, creating a
DocumentFragment does cause the script to execute.
2021-06-18 17:50:15 -04:00
Richard Hansen
7bdd0f2f09
bin/updatePlugins.sh: Many refinements
...
* cd to top-level Etherpad directory is now more robust.
* Only attempt to update packages whose names begin with `ep_`.
* Don't create `package-lock.json`.
* Improve logging.
* Improve error handling.
2021-06-18 04:34:37 -04:00
Richard Hansen
4b3e47bd23
bin/importSqlFile.js: Read the file one line at a time
...
This avoids running out of memory if the file is large.
2021-06-17 19:45:17 -04:00
webzwo0i
485538bd79
bump wtfnode to fix #5078
2021-06-17 06:14:45 +02:00
Richard Hansen
251cc7ab32
CSS: Fix button icon centering
2021-06-16 18:27:52 -04:00
Richard Hansen
53cca5a743
PadMessageHandler: Also send USER_NEWINFO
messages on reconnect
...
Now the user list is correct after a reconnect. This also allows
ep_webrtc to automatically recover after a temporary network glitch.
2021-06-16 01:35:25 -04:00
Richard Hansen
7ca336c28e
lint: Update eslint-config-etherpad and friends
2021-06-14 23:17:17 +02:00
Richard Hansen
ef1ba21104
deps: Drop support for Node.js < 12.13.0
2021-06-14 23:17:17 +02:00
webzwo0i
66ee9c5ef9
update package-lock
2021-06-14 13:21:48 -04:00
Richard Hansen
5dcb7a7549
tests: Don't attempt to wrap non-functions
2021-06-14 13:45:13 +02:00
Richard Hansen
081b97c41d
tests: Wrap more Mocha functions
2021-06-14 13:45:13 +02:00
Richard Hansen
3e4df68510
tests: Enable fake webcam on Microsoft Edge
2021-06-10 15:36:35 -04:00
Richard Hansen
565b1c5271
tests: Fix flexbox grow/shrink factors
...
* Make sure the `#mocha-report` div grows to fill the available
vertical space.
* Prevent the "Loading frontend test specs..." div from shrinking.
2021-06-10 13:28:55 -04:00
Richard Hansen
acd11c3948
tests: Fetch frontend test specs in parallel
2021-06-09 20:28:03 -04:00
Richard Hansen
36d2af5318
tests: Display frontend spec loading progress
2021-06-09 20:18:22 -04:00
Richard Hansen
e0ae997501
tests: Don't auto-scroll Mocha results if user scrolls up
2021-06-09 18:48:31 -04:00
Richard Hansen
f5046f4b18
tests: Keep the #mocha-stats
div visible
2021-06-09 18:48:31 -04:00
snyk-bot
ea4500ef64
fix: upgrade express-session from 1.17.1 to 1.17.2
...
Snyk has created this PR to upgrade express-session from 1.17.1 to 1.17.2.
See this package in npm:
https://www.npmjs.com/package/express-session
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-06-09 22:13:02 +00:00
translatewiki.net
28f2acf98a
Localisation updates from https://translatewiki.net .
2021-06-07 14:48:08 +02:00
Richard Hansen
cccabf45b8
pad: Move error message to the top of the gritter box
2021-06-06 21:31:49 -04:00
Richard Hansen
b2e94685fb
pad: Display error name in the gritter box
2021-06-06 21:31:40 -04:00
Richard Hansen
63a5dc6599
tests: Configure Firefox to use fake webcam
...
This makes it possible to test ep_webrtc in Firefox.
2021-06-06 16:53:51 -04:00
Richard Hansen
8f0d70312d
tests: Also pass --use-fake-ui-for-media-stream
to Chrome
...
For testing ep_webrtc.
2021-06-06 16:25:27 -04:00
Richard Hansen
752e2488af
tests: Migrate from wd
to selenium-webdriver
2021-06-06 16:23:56 -04:00
Richard Hansen
1756415495
tests: Avoid jQuery when reading Mocha output
2021-06-06 16:20:13 -04:00