mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-16 15:19:06 +00:00
[file edit] improved draft autosave
This commit is contained in:
@@ -57,7 +57,15 @@ $(document).click(function(e) {
|
||||
// clear repo enc info when log out
|
||||
$('#logout').click(function() {
|
||||
if ('localStorage' in window && window['localStorage'] !== null) {
|
||||
localStorage.clear();
|
||||
if (localStorage.length > 0) {
|
||||
for (var key in localStorage) {
|
||||
if (key.lastIndexOf('_decrypt_t') == 36 ||
|
||||
key.lastIndexOf('_enc_key') == 36 ||
|
||||
key.lastIndexOf('_enc_iv') == 36) { // key: {{repo_id}}_xx
|
||||
localStorage.removeItem(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
if ($.browser.mozilla || $.browser.msie) {
|
||||
|
Reference in New Issue
Block a user