Ensure shortener button re-enable after creating new paste

This commit is contained in:
Haocen Xu 2019-08-13 21:55:35 -04:00
parent cd5ede5670
commit a5cd8696e6
No known key found for this signature in database
GPG key ID: 3F0D955A0F6AD729
3 changed files with 5 additions and 2 deletions

View file

@ -4108,6 +4108,9 @@ jQuery.PrivateBin = (function($, RawDeflate) {
deleteUrl = baseUri + 'pasteid=' + data.id + '&deletetoken=' + data.deletetoken;
PasteStatus.createPasteNotification(url, deleteUrl);
// enable shortener button
$shortenButton.removeClass('buttondisabled');
// show new URL in browser bar
history.pushState({type: 'newpaste'}, document.title, url);

View file

@ -71,7 +71,7 @@ if ($MARKDOWN):
endif;
?>
<script type="text/javascript" data-cfasync="false" src="js/purify-1.0.11.js" integrity="sha512-p7UyJuyBkhMcMgE4mDsgK0Lz70OvetLefua1oXs1OujWv9gOxh4xy8InFux7bZ4/DAZsTmO4rgVwZW9BHKaTaw==" crossorigin="anonymous"></script>
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="E1by7odRhqoGUagLzMUrqU2hxDB55Tnn8WThNJRUEWjW4JbGdsCBiV9WLGzGlwomJ2XLnYcZGPYd7PMx05SRnw==" crossorigin="anonymous"></script>
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="+Wbo1knNxd7IM9J5YgoT6+Ai0eE7Cp8Kvj9yRvKPQQq3TeShaUxL8M1jsYC6yHRNl4eXyMdjO33+NeXeL7xtQA==" crossorigin="anonymous"></script>
<!--[if IE]>
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;}</style>
<![endif]-->

View file

@ -49,7 +49,7 @@ if ($MARKDOWN):
endif;
?>
<script type="text/javascript" data-cfasync="false" src="js/purify-1.0.11.js" integrity="sha512-p7UyJuyBkhMcMgE4mDsgK0Lz70OvetLefua1oXs1OujWv9gOxh4xy8InFux7bZ4/DAZsTmO4rgVwZW9BHKaTaw==" crossorigin="anonymous"></script>
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="E1by7odRhqoGUagLzMUrqU2hxDB55Tnn8WThNJRUEWjW4JbGdsCBiV9WLGzGlwomJ2XLnYcZGPYd7PMx05SRnw==" crossorigin="anonymous"></script>
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="+Wbo1knNxd7IM9J5YgoT6+Ai0eE7Cp8Kvj9yRvKPQQq3TeShaUxL8M1jsYC6yHRNl4eXyMdjO33+NeXeL7xtQA==" crossorigin="anonymous"></script>
<!--[if IE]>
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;}</style>
<![endif]-->