mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-09 19:39:57 +00:00
ce47f5e1d4
Currently tw5dropbox is broken, pending some further changes around module handling
42 lines
646 B
JavaScript
42 lines
646 B
JavaScript
/*\
|
|
title: $:/plugins/tiddlywiki/dropbox/loginmacro.js
|
|
type: application/javascript
|
|
module-type: macro
|
|
|
|
Dropbox login plugin
|
|
|
|
\*/
|
|
(function(){
|
|
|
|
/*jslint node: true, browser: true */
|
|
/*global $tw: false */
|
|
"use strict";
|
|
|
|
exports.info = {
|
|
name: "dropbox.login",
|
|
params: {}
|
|
};
|
|
|
|
exports.handleEvent = function (event) {
|
|
if(event.type === "click") {
|
|
$tw.plugins.dropbox.forceLogin();
|
|
}
|
|
};
|
|
|
|
exports.executeMacro = function() {
|
|
// Create the link
|
|
var child = $tw.Tree.Element(
|
|
"a",
|
|
null,
|
|
this.content,
|
|
{
|
|
events: ["click"],
|
|
eventHandler: this
|
|
}
|
|
);
|
|
child.execute(this.parents,this.tiddlerTitle);
|
|
return child;
|
|
};
|
|
|
|
})();
|