You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
554 B
JavaScript
24 lines
554 B
JavaScript
define([
|
|
'/common/cryptget.js',
|
|
'/bower_components/jquery/dist/jquery.min.js',
|
|
], function (Crypt) {
|
|
var $ = window.jQuery;
|
|
|
|
var $target = $('#target');
|
|
var $dest = $('#dest');
|
|
|
|
var useDoc = function (err, doc) {
|
|
if (err) { return console.error(err); }
|
|
console.log(doc);
|
|
$dest.text(doc);
|
|
};
|
|
|
|
$('#get').click(function () {
|
|
var val = $target.val();
|
|
if (!val.trim()) { return; }
|
|
Crypt.get(val, useDoc);
|
|
});
|
|
|
|
if (window.location.hash) { Crypt.get(void 0, useDoc); }
|
|
});
|