- fixing JS errors when syntax highlighting is disabled (point 1. #15)
- fixing missing url conversion in highlighted text (point 2. # 15)
This commit is contained in:
parent
d57d6cf44b
commit
be91afa042
|
@ -192,8 +192,10 @@ function displayMessages(key, comments) {
|
||||||
}
|
}
|
||||||
setElementText($('#cleartext'), cleartext);
|
setElementText($('#cleartext'), cleartext);
|
||||||
setElementText($('#prettyprint'), cleartext);
|
setElementText($('#prettyprint'), cleartext);
|
||||||
urls2links($('#cleartext')); // Convert URLs to clickable links.
|
// Convert URLs to clickable links.
|
||||||
prettyPrint();
|
urls2links($('#cleartext'));
|
||||||
|
urls2links($('#prettyprint'));
|
||||||
|
if (typeof prettyPrint == 'function') prettyPrint();
|
||||||
|
|
||||||
// Display paste expiration.
|
// Display paste expiration.
|
||||||
if (comments[0].meta.expire_date) $('#remainingtime').removeClass('foryoureyesonly').text('This document will expire in '+secondsToHuman(comments[0].meta.remaining_time)+'.').removeClass('hidden');
|
if (comments[0].meta.expire_date) $('#remainingtime').removeClass('foryoureyesonly').text('This document will expire in '+secondsToHuman(comments[0].meta.remaining_time)+'.').removeClass('hidden');
|
||||||
|
@ -354,9 +356,11 @@ function send_data() {
|
||||||
|
|
||||||
setElementText($('#cleartext'), $('#message').val());
|
setElementText($('#cleartext'), $('#message').val());
|
||||||
setElementText($('#prettyprint'), $('#message').val());
|
setElementText($('#prettyprint'), $('#message').val());
|
||||||
|
// Convert URLs to clickable links.
|
||||||
urls2links($('#cleartext'));
|
urls2links($('#cleartext'));
|
||||||
|
urls2links($('#prettyprint'));
|
||||||
showStatus('');
|
showStatus('');
|
||||||
prettyPrint();
|
if (typeof prettyPrint == 'function') prettyPrint();
|
||||||
}
|
}
|
||||||
else if (data.status==1) {
|
else if (data.status==1) {
|
||||||
showError('Could not create paste: '+data.message);
|
showError('Could not create paste: '+data.message);
|
||||||
|
|
Loading…
Reference in New Issue