mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
ace: Simplify the aceEditorCSS
hook map function
This commit is contained in:
parent
5778d50166
commit
1da4ec1270
1 changed files with 2 additions and 6 deletions
|
@ -165,12 +165,8 @@ const Ace2Editor = function () {
|
||||||
const includedCSS = [
|
const includedCSS = [
|
||||||
'../static/css/iframe_editor.css',
|
'../static/css/iframe_editor.css',
|
||||||
`../static/css/pad.css?v=${clientVars.randomVersionString}`,
|
`../static/css/pad.css?v=${clientVars.randomVersionString}`,
|
||||||
...hooks.callAll('aceEditorCSS').map((path) => {
|
// Allow urls to external CSS - http(s):// and //some/path.css
|
||||||
if (path.match(/\/\//)) { // Allow urls to external CSS - http(s):// and //some/path.css
|
...hooks.callAll('aceEditorCSS').map((p) => /\/\//.test(p) ? p : `../static/plugins/${p}`),
|
||||||
return path;
|
|
||||||
}
|
|
||||||
return `../static/plugins/${path}`;
|
|
||||||
}),
|
|
||||||
`../static/skins/${clientVars.skinName}/pad.css?v=${clientVars.randomVersionString}`,
|
`../static/skins/${clientVars.skinName}/pad.css?v=${clientVars.randomVersionString}`,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue