John McLear
e18b9d1844
timeslider/bugfix: timeslider wasn't updating when new pad contents was created - #4595
2020-12-20 10:45:16 +00:00
John McLear
0362d3b05d
lint: pad prefix files ( #4577 )
...
* lint: pad_connectionstatus
* lint: pad_utils
* lint: pad_userlist.js -- still WIP
* shift underscore not to be in require but to be used from window
* lint: pad_modals
* pad_impexp.js
* lint: more errors done
* lint: auto reconn
* lint: pad_editor
* lint: finish auto reconn
* lint: imp exp rework
* lint: import
* lint: pad.js nearly done but pizza here...
* lint: clientVars global query
* put clientVars in window
* Revert incorrect lint fixes
* Properly fix guard-for-in lint errors
* Properly fix no-unused-vars error regarding `gritter`
* Refine lint fixes
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2020-12-20 07:15:58 +00:00
Hossein Marzban
34ee77993f
Lint: pluginfw tsort.js ( #4576 )
...
* lint: pluginfw tsort.js
* Don't comment out the `console.log()` call
Disabling the log message is out of scope for the pull request.
* Put const and let on separate lines
* Convert `tsort` from function to arrow function
ESLint doesn't complain about this due to a bug in
prefer-arrow/prefer-arrow-functions rule:
https://github.com/TristonJ/eslint-plugin-prefer-arrow/issues/24
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
2020-12-20 06:18:49 +00:00
Richard Hansen
b82bf5c726
Drop support for Internet Explorer
2020-12-19 19:13:31 +00:00
Richard Hansen
d9b7aa489d
pad import/export: Delete dead functions
2020-12-18 09:29:28 +00:00
Richard Hansen
7e50fc2ab5
Delete dead SERVER_MESSAGE and guest handling code
...
None of this code seems to be reachable. Hopefully no plugins expect
it to exist.
2020-12-18 09:29:28 +00:00
Richard Hansen
f54dcbc766
lint: Re-run eslint --fix
2020-12-16 22:09:48 +00:00
John McLear
92e36b82b5
linting: pad_editbar.js
2020-12-16 12:12:25 +00:00
Hossein Marzban
6f309ac20a
lint: pluginfw/client_plugins ( #4572 )
2020-12-15 21:40:41 -05:00
Richard Hansen
a44debdcfe
Add '
and *
to acceptable URL characters
...
These characters are in the RFC3986 reserved set.
These characters are added to the set of characters that cannot be the
last character of a URL to avoid mislinkification.
2020-12-14 07:03:17 +00:00
Richard Hansen
7d23278ed0
Exclude ?
, !
, and )
from last character of URL
...
Now the final character in each of these example strings is no longer
considered part of the URL:
* Have you seen http://example.com ?
* Look at http://example.com !
* (see http://example.com )
2020-12-14 07:03:17 +00:00
Richard Hansen
7e8de5540f
Factor out common URL regular expression code
...
This also eliminates the differences between the regular expressions.
2020-12-14 07:03:17 +00:00
Richard Hansen
ca01856f94
lint: Fix some straightforward ESLint errors
2020-12-14 07:03:17 +00:00
Richard Hansen
e66e8a4eb2
pad: Fix wrong variable name in global exception handler
...
This fixes a bug introduced in commit
c845d985e0
.
2020-12-10 22:25:58 +00:00
webzwo0i
d25010d5d7
pluginfw: explicitly install the latest version of a plugin, fix for #4536 ( #4543 )
2020-12-05 14:08:02 +00:00
Richard Hansen
aa41b0920c
admin/plugins: Don't keep adding more Update buttons
2020-11-27 16:59:24 +00:00
Richard Hansen
6a00d7f8d6
admin/plugins: Use jQuery to build the Update button
2020-11-27 16:59:24 +00:00
Richard Hansen
2ddc45bf07
admin/plugins: Simplify jQuery search for plugin actions
2020-11-27 16:59:24 +00:00
Richard Hansen
973644c7dd
lint: Fix ESLint errors in /admin/plugins
code
2020-11-27 16:59:24 +00:00
Richard Hansen
750c7cb1cf
pad: Delete unused ip
and userAgent
client vars
2020-11-26 15:00:46 +00:00
Richard Hansen
53bc80e381
pad userlist: Use jQuery to create rows
...
This makes the code easier to read and maintain, and it reduces the
likelihood of introducing an XSS vulnerability.
2020-11-26 15:00:46 +00:00
Ilmar Türk
ba7d80fa57
Update dropdowns on language change ( #4519 )
2020-11-25 21:39:21 +00:00
Richard Hansen
e247c716c2
editor: Add argument to suppress SonarCloud error
...
This also makes it easier for devs to understand the expected function
signature.
2020-11-24 20:06:12 +00:00
Richard Hansen
d24306ea6a
editor: Delete unused isTimeUp
argument
...
This fixes a SonarCloud error.
2020-11-24 20:06:12 +00:00
Richard Hansen
ed7ba64635
editor: Delete unused optModFunc
argument
2020-11-24 20:06:12 +00:00
Richard Hansen
d0114d4ac2
editor: Delete commented-out code
2020-11-24 20:06:12 +00:00
Richard Hansen
bb722763d0
editor: Delete dead code
...
This silences some SonarCloud errors.
2020-11-24 20:06:12 +00:00
Richard Hansen
8e5fd19db2
lint: Run eslint --fix
on src/
2020-11-24 20:06:12 +00:00
Richard Hansen
0625739cb8
lint: Declare variables above their first use
...
This makes it possible to convert from `var` to `let` without getting
ReferenceErrors.
2020-11-24 20:06:12 +00:00
Richard Hansen
7df3ded66f
lint: Put opening brace on same line as function
...
Normally I would let `eslint --fix` do this for me, but there's a bug
that causes:
const x = function ()
{
// ...
};
to become:
const x = ()
=> {
// ...
};
which ESLint thinks is a syntax error. (It probably is; I don't know
enough about the automatic semicolon insertion rules to be confident.)
2020-11-24 20:06:12 +00:00
Richard Hansen
07bcbbd404
pad: Include the stack in the data sent to /jserror
2020-11-17 08:02:27 +00:00
Richard Hansen
c845d985e0
pad: Pop up an error message on unhandled Promise rejection
2020-11-17 08:02:27 +00:00
Richard Hansen
93c335b3b8
pad: Use a relative URL to simplify
...
Also avoid creating an unnecessary variable.
2020-11-17 08:02:27 +00:00
Richard Hansen
cedd27e4fe
plugins: Default the module name to the plugin name
2020-11-13 20:30:27 +00:00
Richard Hansen
afb025030c
plugins: Use a log4js logger for npm messages
2020-11-13 20:30:27 +00:00
Richard Hansen
8a918fbc46
plugins: async
ify more functions
2020-11-13 20:30:27 +00:00
Richard Hansen
9f575ebc84
plugins: Delete unused ensure
function
2020-11-13 20:30:27 +00:00
Richard Hansen
ac5614dadd
plugins: Don't export callInit
...
It's unused outside of this module.
Also use an arrow function.
2020-11-13 20:30:27 +00:00
Richard Hansen
ba4794cf8a
plugins: Call require('./hooks')
at top level
2020-11-13 20:30:27 +00:00
Richard Hansen
14a9479e69
plugins: Use functions from fs.promises
2020-11-13 20:30:27 +00:00
Richard Hansen
d624aa936e
plugins: Fix plugin name in error messages
2020-11-13 20:30:27 +00:00
ilmar
d5c5ca224b
Fix missing arg handling in html10n.js
2020-11-05 10:38:22 +00:00
Richard Hansen
98de2b0899
Use contentEditable
for all browsers
...
This makes it possible to disable `contentEditable` for certain
elements in some circumstances (e.g., on links so that users can click
on them normally).
2020-11-03 19:02:01 +00:00
Richard Hansen
5e2a27a182
Replace setClassPresence(x, ...)
with x.classList.toggle(...)
2020-11-03 19:02:01 +00:00
Richard Hansen
4594608c04
Delete commented-out code
2020-11-03 19:02:01 +00:00
Gabriel Medeiros Coelho
ce77c48475
remove unnecessary conditional
...
if animationState evaluates to -1 or 0, it would end up in a conditional that assign its value to itself. Since this is redundant, it is better to remove this conditional, to avoid an extra check
2020-11-01 01:41:09 -05:00
Richard Hansen
193028702d
pad: Don't paste when middle-clicking on a link
2020-10-25 07:06:29 +00:00
John McLear
cb5fcbb74e
editor: allow paste into links ( #3802 )
2020-10-24 16:59:03 +01:00
Richard Hansen
36aceb3aba
hooks: Rewrite callAll
and aCallAll
for consistency
...
Rewrite the `callAll` and `aCallAll` functions to support all
reasonable hook behaviors and to report errors for unreasonable
behaviors (e.g., calling the callback twice).
Now a hook function like the following works as expected when invoked
by `aCallAll`:
```
exports.myHookFn = (hookName, context, cb) => {
cb('some value');
return;
};
```
2020-10-24 16:08:50 +01:00
Richard Hansen
55939a0d7e
hooks: Delete unused flatten
function
2020-10-24 16:08:50 +01:00