mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-05-12 07:46:16 +02: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
@ -146,6 +146,14 @@ const minify = async (req, res) => {
|
||||
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:
|
||||
paths like "plugins/ep_myplugin/static/js/test.js"
|
||||
are rewritten into ROOT_PATH_OF_MYPLUGIN/static/js/test.js,
|
||||
|
||||
@ -83,4 +83,5 @@
|
||||
, "pluginfw/hooks.js"
|
||||
]
|
||||
, "jquery.js": ["jquery.js"]
|
||||
, "underscore.js": ["underscore.js"]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user