1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-06-07 09:04:06 +00:00
2023-07-07 13:15:03 +02:00

36 lines
602 B
JavaScript

/*\
title: $:/core/modules/commands/password.js
type: application/javascript
module-type: command
Save password for crypto operations
\*/
/*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;