mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-27 17:14:41 +00:00
Started to move dropbox bits and pieces into a plugin
Currently tw5dropbox is broken, pending some further changes around module handling
This commit is contained in:
26
plugins/tiddlywiki/dropbox-main/dropbox-main.js
Normal file
26
plugins/tiddlywiki/dropbox-main/dropbox-main.js
Normal file
@@ -0,0 +1,26 @@
|
||||
/*\
|
||||
title: $:/plugins/tiddlywiki/dropbox-main/dropbox-main.js
|
||||
type: application/javascript
|
||||
module-type: dropbox-startup
|
||||
|
||||
Startup the Dropbox main app
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
exports.startup = function(loggedIn) {
|
||||
if(loggedIn) {
|
||||
$tw.wiki.addTiddler({title: $tw.plugins.dropbox.titleLoadedWikis, text: "no"},true);
|
||||
// Load tiddlers
|
||||
$tw.plugins.dropbox.loadWikiFiles("/",function() {
|
||||
$tw.wiki.addTiddler({title: $tw.plugins.dropbox.titleLoadedWikis, text: "yes"},true);
|
||||
console.log("Loaded all wikis",$tw.wiki.tiddlers);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
||||
Reference in New Issue
Block a user