Added tab press handler
This commit is contained in:
@@ -252,6 +252,18 @@
|
|||||||
function init() {
|
function init() {
|
||||||
sjcl.random.startCollectors();
|
sjcl.random.startCollectors();
|
||||||
|
|
||||||
|
$("#data").keydown(function(e) {
|
||||||
|
if(e.keyCode === 9) { // from http://stackoverflow.com/questions/6140632/how-to-handle-tab-in-textarea
|
||||||
|
var start = this.selectionStart;
|
||||||
|
var end = this.selectionEnd;
|
||||||
|
|
||||||
|
var $this = $(this);
|
||||||
|
$this.val($this.val().substring(0, start) + "\t" + $this.val().substring(end));
|
||||||
|
this.selectionStart = this.selectionEnd = start + 1;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (!supportsStorage()) {
|
if (!supportsStorage()) {
|
||||||
alert("Your browser does not have Local Storage support. Come back when you've upgraded.");
|
alert("Your browser does not have Local Storage support. Come back when you've upgraded.");
|
||||||
}
|
}
|
||||||
@@ -273,6 +285,15 @@
|
|||||||
|
|
||||||
$("#myModal").modal({backdrop: "static", keyboard: false}); // undocumented trick to not hide the dialog
|
$("#myModal").modal({backdrop: "static", keyboard: false}); // undocumented trick to not hide the dialog
|
||||||
|
|
||||||
|
var crypt_key=window.location.hash.substring(1);
|
||||||
|
|
||||||
|
if (crypt_key != "") {
|
||||||
|
console.log("poopfuck")
|
||||||
|
$("#password").val(crypt_key)
|
||||||
|
login()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// set up buttons
|
// set up buttons
|
||||||
$("#backuper").click(doBackup);
|
$("#backuper").click(doBackup);
|
||||||
$("#restorer").click(restoreKVS);
|
$("#restorer").click(restoreKVS);
|
||||||
|
|||||||
Reference in New Issue
Block a user