changes requested by rugk

pull/313/head
Philipp Zeitschel 6 years ago
parent db3b44e796
commit 423bae34ea

@ -56,8 +56,8 @@ languageselection = false
; the pastes encryption key
; urlshortener = "https://shortener.example.com/api?link="
; you can set urlshortenerajax to yes if the shortener returns the url plain text
; YOU HAVE TO set Control-Allow-Origin header on the other side!
; you can set urlshortenerajax to true if the shortener returns the url plain text
; YOU HAVE TO set Control-Allow-Origin header in the link shortener Server!
; https://enable-cors.org/server_apache.html
; https://enable-cors.org/server_nginx.html
; urlshortenerajax = "false"

@ -1195,17 +1195,21 @@ jQuery.PrivateBin = (function($, sjcl, Base64, RawDeflate) {
*/
function sendToShortener()
{
var url = $shortenButton.data('shortener')+encodeURIComponent($pasteUrl.attr('href'));
var url = $shortenButton.data('shortener') + encodeURIComponent($pasteUrl.attr('href'));
if($shortenButton.data('ajax'))
{
$.get(url, function(d) {
$pasteUrl.attr(d);
$pasteUrl.html(d);
$pasteUrl.html(d.text());
Helper.selectText($pasteUrl[0]);
$shortenButton.remove();
})
})
}
else
{
window.location.href = url;
}
}
/**

@ -75,7 +75,7 @@ if ($MARKDOWN):
<?php
endif;
?>
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-pW9/DMkecULCxJA/5uLbi6op7C8Yl6K8YNw43o2BNyH/AxTPEZQGwX49KvNmrDoziRad+CiSAyBHjsvinuwZrw==" crossorigin="anonymous"></script>
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-DY1wLz/O/s4a5i/ldilMjCCFErA7aPtH6Yo4wYcIRY7macbMieaKA2YitqWMzGq72ijqiqq9CQmIAn2AoGVLpA==" crossorigin="anonymous"></script>
<!--[if lt IE 10]>
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
<![endif]-->

@ -54,7 +54,7 @@ if ($QRCODE):
<?php
endif;
?>
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-pW9/DMkecULCxJA/5uLbi6op7C8Yl6K8YNw43o2BNyH/AxTPEZQGwX49KvNmrDoziRad+CiSAyBHjsvinuwZrw==" crossorigin="anonymous"></script>
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-DY1wLz/O/s4a5i/ldilMjCCFErA7aPtH6Yo4wYcIRY7macbMieaKA2YitqWMzGq72ijqiqq9CQmIAn2AoGVLpA==" crossorigin="anonymous"></script>
<!--[if lt IE 10]>
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
<![endif]-->

Loading…
Cancel
Save