mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 08:26:16 -04:00
pluginfw: Improve rendering of hook list
There are two main benefits: * HTML is no longer printed in the startup debug logs. * `require()` is no longer called on client-side files. This eliminates "Failed to load <file> for <plugin>: ReferenceError: window is not defined" errors when users visit `/admin/plugins/info`.
This commit is contained in:
parent
7e698baa80
commit
0aad3b74da
3 changed files with 43 additions and 11 deletions
|
@ -26,8 +26,8 @@ exports.expressCreateServer = (hookName, args, cb) => {
|
|||
epVersion,
|
||||
installedPlugins: `<pre>${plugins.formatPlugins().replace(/, /g, '\n')}</pre>`,
|
||||
installedParts: `<pre>${plugins.formatParts()}</pre>`,
|
||||
installedServerHooks: `<div>${plugins.formatHooks()}</div>`,
|
||||
installedClientHooks: `<div>${plugins.formatHooks('client_hooks')}</div>`,
|
||||
installedServerHooks: `<div>${plugins.formatHooks('hooks', true)}</div>`,
|
||||
installedClientHooks: `<div>${plugins.formatHooks('client_hooks', true)}</div>`,
|
||||
latestVersion: UpdateCheck.getLatestVersion(),
|
||||
req,
|
||||
}));
|
||||
|
|
|
@ -144,7 +144,7 @@ exports.start = async () => {
|
|||
.join(', ');
|
||||
logger.info(`Installed plugins: ${installedPlugins}`);
|
||||
logger.debug(`Installed parts:\n${plugins.formatParts()}`);
|
||||
logger.debug(`Installed hooks:\n${plugins.formatHooks()}`);
|
||||
logger.debug(`Installed server-side hooks:\n${plugins.formatHooks('hooks', false)}`);
|
||||
await hooks.aCallAll('loadSettings', {settings});
|
||||
await hooks.aCallAll('createServer');
|
||||
} catch (err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue