mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-17 15:21:22 +00:00
Rejigging syncer structuring
The goal is to separate out the saver handling from the syncadaptor handling; it will take a few steps to get there
This commit is contained in:
@@ -62,8 +62,17 @@ exports.startup = function() {
|
||||
document: document
|
||||
});
|
||||
}
|
||||
// Find a working syncadaptor
|
||||
$tw.syncadaptor = undefined;
|
||||
$tw.modules.forEachModuleOfType("syncadaptor",function(title,module) {
|
||||
if(!$tw.syncadaptor && module.adaptorClass) {
|
||||
$tw.syncadaptor = new module.adaptorClass({wiki: $tw.wiki});
|
||||
}
|
||||
});
|
||||
// Set up the syncer object
|
||||
$tw.syncer = new $tw.Syncer({wiki: $tw.wiki});
|
||||
if($tw.syncadaptor) {
|
||||
$tw.syncer = new $tw.Syncer({wiki: $tw.wiki, syncadaptor: $tw.syncadaptor});
|
||||
}
|
||||
// Host-specific startup
|
||||
if($tw.browser) {
|
||||
// Install the popup manager
|
||||
|
||||
Reference in New Issue
Block a user