mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2024-03-22 13:10:41 +08:00
Change order of execution to detect delete token properly
This commit is contained in:
parent
e298c3d10c
commit
25a39148a8
|
@ -5373,6 +5373,12 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
|||
}
|
||||
me.initZ();
|
||||
|
||||
// if delete token is passed (i.e. paste has been deleted by this
|
||||
// access), there is nothing more to do
|
||||
if (Model.hasDeleteToken()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// check whether existing paste needs to be shown
|
||||
try {
|
||||
Model.getPasteId();
|
||||
|
@ -5381,11 +5387,6 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
|||
return me.newPaste();
|
||||
}
|
||||
|
||||
// if delete token is passed (i.e. paste has been deleted by this
|
||||
// access), there is nothing more to do
|
||||
if (Model.hasDeleteToken()) {
|
||||
return;
|
||||
}
|
||||
// always reload on back button to invalidate cache(protect burn after read paste)
|
||||
window.addEventListener('popstate', () => {
|
||||
window.location.reload();
|
||||
|
|
Loading…
Reference in New Issue
Block a user