TiddlyWiki5/core/modules/commands/password.js

37 wiersze
620 B
JavaScript
Czysty Zwykły widok Historia

2012-09-02 20:00:24 +00:00
/*\
title: $:/core/modules/commands/password.js
type: application/javascript
module-type: command
Save password for crypto operations
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.info = {
name: "password",
synchronous: true
};
var Command = function(params,commander,callback) {
this.params = params;
this.commander = commander;
this.callback = callback;
};
Command.prototype.execute = function() {
if(this.params.length < 1) {
return "Missing password";
}
$tw.crypto.setPassword(this.params[0]);
return null;
};
exports.Command = Command;
})();