John McLear
7696ec0a02
Merge branch 'develop' of github.com:ether/etherpad-lite into mochawesome
2021-01-27 20:11:53 +00:00
Richard Hansen
e5b45cc984
contentcollector: Delete unnecessary dom
functions
...
And move the remaining functions out of the `makeContentCollector()`
function.
2021-01-27 04:59:36 +00:00
Richard Hansen
275f041fbb
contentcollector: Simplify child node access
2021-01-27 04:59:36 +00:00
Richard Hansen
1cb5453aeb
contentcollector: Skip over non-Text, non-Element Nodes
2021-01-27 04:59:36 +00:00
Richard Hansen
075969aea0
contentcollector: Fix Element tag name fetch
...
The `name` property is only available on cheerio's Element-like
objects; DOM Element objects do not have a `name` property. Switch to
`dom.tagName()` to fix the logic for browsers.
2021-01-27 04:59:36 +00:00
Richard Hansen
e3ec9d9a4c
contentcollector: Fix parent node access
...
The `parent` property is only available on cheerio's Node-like
objects; DOM Node objects do not have a `parent` property. Switch to
the `parentNode` property so that the code works in browsers as well
as cheerio.
2021-01-27 04:59:36 +00:00
Richard Hansen
1d36549152
contentcollector: Delete unnecessary parentheses
2021-01-27 04:59:36 +00:00
Richard Hansen
e3a47e48f9
contentcollector: Fix collectContentLineText hook
...
Before, the hook always ignored the return values provided by the hook
functions. Now the hook functions can change the text by either
returning a string or setting `context.text` to the desired value.
Also drop the `styl` and `cls` context properties. They were never
documented and they were always null.
2021-01-27 04:59:36 +00:00
Richard Hansen
4e220538a1
contentcollector: Use destructuring to improve readability
2021-01-27 04:59:36 +00:00
Richard Hansen
b547ce9a47
contentcollector: Invert logic to improve readability
2021-01-27 04:59:36 +00:00
Richard Hansen
b811030846
contentcollector: Delete unnecessary truthiness check
2021-01-27 04:59:36 +00:00
Richard Hansen
fc2420c244
contentcollector: Fix iteration over child Nodes
...
In the DOM, `.children` only includes children that are Element
objects. In cheerio 0.22.0, `.children` includes all child Nodes, not
just Elements. Use `dom.numChildNodes()` and `dom.childNode()` so that
browsers behave the same as cheerio.
2021-01-27 04:59:36 +00:00
Richard Hansen
d0bfb54c0a
contentcollector: Avoid for..in
iteration of object properties
...
`for..in` iterates over inherited properties, which is almost never
desired. In most cases there aren't any inherited enumerable
properties so it's not that big of a deal, but in the case of
HTMLCollection it's very bad because it iterates over every entry
twice (once by numerical index and once by name) plus it includes the
`length` property in the iteration.
2021-01-27 04:59:36 +00:00
Richard Hansen
3cfec58948
contentcollector: Rename dom
functions for consistency with DOM spec
2021-01-27 04:59:36 +00:00
Richard Hansen
8763c3bb29
contentcollector: Fix Element attribute accesses
...
The `attribs` property is only available on cheerio's Element-like
objects; DOM Element objects do not have an `attribs` property. Switch
to `dom.nodeAttr()` to fix the logic for browsers.
2021-01-27 04:59:36 +00:00
Richard Hansen
99625950c8
contentcollector: Factor out call to .toLowerCase()
2021-01-27 04:59:36 +00:00
Richard Hansen
dd7fb1babe
contentcollector: Document the dom
object
2021-01-27 04:59:36 +00:00
Richard Hansen
74bb2f76cc
contentcollector: Delete unused domInterface
parameter
2021-01-27 04:59:36 +00:00
Richard Hansen
42c25b2536
openapi: Fix error logging
2021-01-27 04:59:36 +00:00
Richard Hansen
54a3dbb9a0
lint: Fix some straightforward ESLint errors
2021-01-27 04:59:36 +00:00
John McLear
1b74f29f7b
PL
2021-01-26 17:46:04 +00:00
John McLear
45d54ca874
perf test
2021-01-26 16:50:04 +00:00
John McLear
48ebc3af5a
perf test
2021-01-26 16:48:08 +00:00
John McLear
49ebba4d6c
some duration storage in stats
2021-01-26 16:41:08 +00:00
John McLear
697bfd979b
use reporter
2021-01-26 11:09:22 +00:00
Bartlomiej Witczak
4b4b685bba
fix: runtime error if no buttons are present in toolbar ( #4680 )
...
Co-authored-by: Bartek Witczak <bartek@dayone.pl>
2021-01-26 11:02:54 +00:00
Richard Hansen
b73b0bcb98
farbtastic: Minimize diff to upstream
...
This should make it easier to upgrade to the latest version.
2021-01-26 04:07:43 -05:00
Richard Hansen
a0745d74b9
farbtastic: Document where the code came from
2021-01-26 04:07:43 -05:00
John McLear
3a19254f21
stale code: removed excanvas which was ie support for no canvas
2021-01-26 04:05:54 -05:00
John McLear
7768871f8f
security: bumping socketio version due to vulnerability
2021-01-26 00:53:04 -05:00
John McLear
81b860bc35
tests: allow for longer timeout
2021-01-25 22:53:11 -05:00
John McLear
7421730b44
lint: src/node/utils/toolbar.js
2021-01-25 22:53:11 -05:00
John McLear
89aa8cf55e
lint: src/node/utils/randomstring.js
2021-01-25 22:53:11 -05:00
John McLear
21ef857d8a
lint: src/node/utils/promises.js
2021-01-25 22:53:11 -05:00
John McLear
b831feae66
lint: src/node/utils/path_exists.js
2021-01-25 22:53:11 -05:00
John McLear
4f7e322d53
lint: src/node/utils/padDiff.js
2021-01-25 22:53:11 -05:00
John McLear
9759e09387
lint: src/node/utils/customError.js
2021-01-25 22:53:11 -05:00
John McLear
f664f84da5
lint: src/node/utils/caching_middleware.js
2021-01-25 22:53:11 -05:00
John McLear
02c1bf7d81
lint: src/node/utils/UpdateCheck.js
2021-01-25 22:53:11 -05:00
John McLear
f8323eae89
lint: src/node/utils/TidyHtml.js
2021-01-25 22:53:11 -05:00
John McLear
31f1e39565
lint: src/node/utils/Settings.js
2021-01-25 22:53:11 -05:00
John McLear
af8ea6b45f
lint: src/node/utils/NodeVersion.js
2021-01-25 22:53:11 -05:00
John McLear
b11ba23208
lint: src/node/utils/MinifyWorker.js
2021-01-25 22:53:11 -05:00
John McLear
b5e04d867e
lint: src/node/utils/LibreOffice.js
2021-01-25 22:53:11 -05:00
John McLear
85d1dc8d71
lint: src/node/utils/ImportHtml.js
2021-01-25 22:53:11 -05:00
John McLear
a41b4b8e45
lint: src/node/utils/ImportEtherpad.js
2021-01-25 22:53:11 -05:00
John McLear
9fff82e370
lint: src/node/utils/ExportTxt.js
2021-01-25 22:53:11 -05:00
John McLear
bfabe7c297
lint: src/node/utils/ExportHtml.js
2021-01-25 22:53:11 -05:00
John McLear
c44c4edc10
lint: src/node/utils/ExportHelper.js
2021-01-25 22:53:11 -05:00
John McLear
a4764faded
lint: src/node/utils/ExportEtherpad.js
2021-01-25 22:53:11 -05:00