mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
reversecompat: underscore
Backward compatibility for plugins that were written when underscore lived at src/static/js/underscore.js.
This commit is contained in:
parent
50782bd03a
commit
c0ec28f781
2 changed files with 9 additions and 0 deletions
|
@ -146,6 +146,14 @@ const minify = async (req, res) => {
|
||||||
filename = 'js/vendors/jquery.js';
|
filename = 'js/vendors/jquery.js';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Backward compatibility for plugins that were written when underscore lived at
|
||||||
|
// src/static/js/underscore.js.
|
||||||
|
if (['js/underscore.js', 'plugins/ep_etherpad-lite/static/js/underscore.js']
|
||||||
|
.indexOf(filename) !== -1) {
|
||||||
|
logger.warn(`request for deprecated underscore path: ${filename}`);
|
||||||
|
filename = 'js/vendors/underscore.js';
|
||||||
|
}
|
||||||
|
|
||||||
/* Handle static files for plugins/libraries:
|
/* Handle static files for plugins/libraries:
|
||||||
paths like "plugins/ep_myplugin/static/js/test.js"
|
paths like "plugins/ep_myplugin/static/js/test.js"
|
||||||
are rewritten into ROOT_PATH_OF_MYPLUGIN/static/js/test.js,
|
are rewritten into ROOT_PATH_OF_MYPLUGIN/static/js/test.js,
|
||||||
|
|
|
@ -83,4 +83,5 @@
|
||||||
, "pluginfw/hooks.js"
|
, "pluginfw/hooks.js"
|
||||||
]
|
]
|
||||||
, "jquery.js": ["jquery.js"]
|
, "jquery.js": ["jquery.js"]
|
||||||
|
, "underscore.js": ["underscore.js"]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue