mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
Inject pad dependencies into most pad submodules.
This commit is contained in:
parent
56c07e484a
commit
514698162f
8 changed files with 22 additions and 26 deletions
|
@ -236,13 +236,9 @@ var padimpexp = (function()
|
|||
/////
|
||||
var pad = undefined;
|
||||
var self = {
|
||||
init: function()
|
||||
init: function(_pad)
|
||||
{
|
||||
try {
|
||||
pad = require('/pad2').pad; // Sidestep circular dependency (should be injected).
|
||||
} catch (e) {
|
||||
// skip (doesn't require pad when required by timeslider)
|
||||
}
|
||||
pad = _pad;
|
||||
|
||||
//get /p/padname
|
||||
var pad_root_path = new RegExp(/.*\/p\/[^\/]+/).exec(document.location.pathname)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue