mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
ace: Simplify the aceEditorCSS
hook map function
This commit is contained in:
parent
94c221586c
commit
9cfc2fb801
1 changed files with 3 additions and 6 deletions
|
@ -168,12 +168,9 @@ const Ace2Editor = function () {
|
||||||
const $$INCLUDE_CSS = (filename) => { includedCSS.push(filename); };
|
const $$INCLUDE_CSS = (filename) => { includedCSS.push(filename); };
|
||||||
$$INCLUDE_CSS('../static/css/iframe_editor.css');
|
$$INCLUDE_CSS('../static/css/iframe_editor.css');
|
||||||
$$INCLUDE_CSS(`../static/css/pad.css?v=${clientVars.randomVersionString}`);
|
$$INCLUDE_CSS(`../static/css/pad.css?v=${clientVars.randomVersionString}`);
|
||||||
includedCSS.push(...hooks.callAll('aceEditorCSS').map((path) => {
|
includedCSS.push(...hooks.callAll('aceEditorCSS').map(
|
||||||
if (path.match(/\/\//)) { // Allow urls to external CSS - http(s):// and //some/path.css
|
// Allow urls to external CSS - http(s):// and //some/path.css
|
||||||
return path;
|
(p) => /\/\//.test(p) ? p : `../static/plugins/${p}`));
|
||||||
}
|
|
||||||
return `../static/plugins/${path}`;
|
|
||||||
}));
|
|
||||||
$$INCLUDE_CSS(
|
$$INCLUDE_CSS(
|
||||||
`../static/skins/${clientVars.skinName}/pad.css?v=${clientVars.randomVersionString}`);
|
`../static/skins/${clientVars.skinName}/pad.css?v=${clientVars.randomVersionString}`);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue