mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-08-06 05:24:17 -04:00
edge cases: re-enable remember button when creating a new paste, refresh list and disble button upon memorizing the current paste
This commit is contained in:
parent
ea93c474ea
commit
521f134638
3 changed files with 7 additions and 2 deletions
|
@ -4411,6 +4411,10 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
|||
}
|
||||
const memory = db.transaction('pastes', 'readwrite').objectStore('pastes');
|
||||
const request = memory.add(newPaste);
|
||||
request.onsuccess = function(e) {
|
||||
me.refreshList();
|
||||
$('#rememberbutton').addClass('disabled');
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
|
@ -4796,6 +4800,7 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
|||
|
||||
// show new URL in browser bar
|
||||
history.pushState({type: 'newpaste'}, document.title, url);
|
||||
$('#rememberbutton').removeClass('disabled');
|
||||
|
||||
TopNav.showViewButtons();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue