frio: formating, otherwise untouched

This commit is contained in:
Extarys 2021-01-22 08:38:44 -05:00
parent cb24e8987c
commit 91d3e72be7
25 changed files with 3300 additions and 2937 deletions

View file

@ -6,33 +6,33 @@ var linkPreview;
/**
* Insert a link into friendica jot.
*
*
* @returns {void}
*/
function jotGetLink() {
var currentText = $("#profile-jot-text").val();
var noAttachment = '';
var noAttachment = "";
reply = prompt(aStr.linkurl);
if(reply && reply.length) {
if (reply && reply.length) {
// There should be only one attachment per post.
// So we need to remove the old one.
$('#jot-attachment-preview').empty();
$('#profile-rotator').show();
$("#jot-attachment-preview").empty();
$("#profile-rotator").show();
if (currentText.includes("[attachment") && currentText.includes("[/attachment]")) {
noAttachment = '&noAttachment=1';
noAttachment = "&noAttachment=1";
}
// We use the linkPreview library to have a preview
// of the attachments.
if (typeof linkPreview === 'object') {
if (typeof linkPreview === "object") {
linkPreview.crawlText(reply + noAttachment);
// Fallback: insert the attachment bbcode directly into the textarea
// if the attachment live preview isn't available
// Fallback: insert the attachment bbcode directly into the textarea
// if the attachment live preview isn't available
} else {
$.get('parse_url?binurl=' + bin2hex(reply) + noAttachment, function(data) {
$.get("parse_url?binurl=" + bin2hex(reply) + noAttachment, function (data) {
addeditortext(data);
$('#profile-rotator').hide();
$("#profile-rotator").hide();
});
}
autosize.update($("#profile-jot-text"));