insert Paste class to wrap the data, to be able to extend the paste with getters and format version handling
This commit is contained in:
parent
398fabd664
commit
d73c68ad85
@ -39,6 +39,21 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
|||||||
*/
|
*/
|
||||||
let z;
|
let z;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Paste class
|
||||||
|
*
|
||||||
|
* bundles helper fuctions around the paste formats
|
||||||
|
*
|
||||||
|
* @name Paste
|
||||||
|
* @class
|
||||||
|
*/
|
||||||
|
function Paste(data) {
|
||||||
|
// store all keys in the default locations for drop-in replacement
|
||||||
|
for (let key in data) {
|
||||||
|
this[key] = raw[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* static Helper methods
|
* static Helper methods
|
||||||
*
|
*
|
||||||
@ -4518,7 +4533,7 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
ServerInteraction.setSuccess(function (status, data) {
|
ServerInteraction.setSuccess(function (status, data) {
|
||||||
PasteDecrypter.run(data);
|
PasteDecrypter.run(new Paste(data));
|
||||||
|
|
||||||
// restore position
|
// restore position
|
||||||
window.scrollTo(0, orgPosition);
|
window.scrollTo(0, orgPosition);
|
||||||
|
@ -72,7 +72,7 @@ if ($MARKDOWN):
|
|||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript" data-cfasync="false" src="js/purify-1.0.7.js" integrity="sha512-VnKJHLosO8z2ojNvWk9BEKYqnhZyWK9rM90FgZUUEp/PRnUqR5OLLKE0a3BkVmn7YgB7LXRrjHgFHQYKd6DAIA==" crossorigin="anonymous"></script>
|
<script type="text/javascript" data-cfasync="false" src="js/purify-1.0.7.js" integrity="sha512-VnKJHLosO8z2ojNvWk9BEKYqnhZyWK9rM90FgZUUEp/PRnUqR5OLLKE0a3BkVmn7YgB7LXRrjHgFHQYKd6DAIA==" crossorigin="anonymous"></script>
|
||||||
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-t9Zs9EkImSMS7DBczj95hrZi7CErcJ7w66LxUgy3dmu02AiiF0Mp/WNeq0MDIctCkepOde0o/E/0N4ETX/Z5TA==" crossorigin="anonymous"></script>
|
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-BXfr303yRK2h2PNc3KZ53guQFGRlJ87A6Po3vUWg5y96eds/WqjToV/9y0Ze6pmtp1fDfqMTSy3WH/q2a6rKfg==" crossorigin="anonymous"></script>
|
||||||
<!--[if lt IE 10]>
|
<!--[if lt IE 10]>
|
||||||
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
|
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
@ -50,7 +50,7 @@ if ($MARKDOWN):
|
|||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript" data-cfasync="false" src="js/purify-1.0.7.js" integrity="sha512-VnKJHLosO8z2ojNvWk9BEKYqnhZyWK9rM90FgZUUEp/PRnUqR5OLLKE0a3BkVmn7YgB7LXRrjHgFHQYKd6DAIA==" crossorigin="anonymous"></script>
|
<script type="text/javascript" data-cfasync="false" src="js/purify-1.0.7.js" integrity="sha512-VnKJHLosO8z2ojNvWk9BEKYqnhZyWK9rM90FgZUUEp/PRnUqR5OLLKE0a3BkVmn7YgB7LXRrjHgFHQYKd6DAIA==" crossorigin="anonymous"></script>
|
||||||
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-t9Zs9EkImSMS7DBczj95hrZi7CErcJ7w66LxUgy3dmu02AiiF0Mp/WNeq0MDIctCkepOde0o/E/0N4ETX/Z5TA==" crossorigin="anonymous"></script>
|
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-BXfr303yRK2h2PNc3KZ53guQFGRlJ87A6Po3vUWg5y96eds/WqjToV/9y0Ze6pmtp1fDfqMTSy3WH/q2a6rKfg==" crossorigin="anonymous"></script>
|
||||||
<!--[if lt IE 10]>
|
<!--[if lt IE 10]>
|
||||||
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
|
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
Loading…
Reference in New Issue
Block a user