mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-28 18:05:00 +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:
41
plugins/tiddlywiki/dropbox/logoutmacro.js
Normal file
41
plugins/tiddlywiki/dropbox/logoutmacro.js
Normal file
@@ -0,0 +1,41 @@
|
||||
/*\
|
||||
title: $:/plugins/tiddlywiki/dropbox/logoutmacro.js
|
||||
type: application/javascript
|
||||
module-type: macro
|
||||
|
||||
Dropbox logout plugin
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
exports.info = {
|
||||
name: "dropbox.logout",
|
||||
params: {}
|
||||
};
|
||||
|
||||
exports.handleEvent = function (event) {
|
||||
if(event.type === "click") {
|
||||
$tw.plugins.dropbox.logout();
|
||||
}
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
})();
|
||||
Reference in New Issue
Block a user