Добавил еще ведущие нули к миллисекундам, если кому-то еще когда-то этот код понадобится
log = function (text, color, define){ var id, time, thread, logHtml, textLog; define = (typeof define == 'string') ? define.split(/[\s,.|:;]+/g) : define; if(typeof define === 'object' && define !== null){ if(Array.isArray(define)){ id = define.indexOf('id') > -1; time = define.indexOf('time') > -1; thread = define.indexOf('thread') > -1; } else{ id = define.id == true; time = define.time == true; thread = define.thread == true; } } else id = time = thread = true; id = id ? '<a href="action://action' + ScriptWorker.GetCurrentAction() + '" style="color:gray;">[' + ScriptWorker.GetCurrentAction() + ']</a>' : ''; time = time ? ' ' + getTime() : ''; thread = thread ? ' Поток №' + thread_number() : ''; logHtml = (id || time || thread) ? id + '<span style="color: white">' + time + thread + ' : </span>' : ''; logHtml += '<span style="color:' + (color ? color : 'white') + '">' + text + '</span>'; textLog = '[' + ScriptWorker.GetCurrentAction() + ']' + time + thread + ' : ' + text function getTime(){ var checkTime = function(i){ return (i < 10) ? "0" + i : i; }; var checkMilliSeconds = function(ms){ if (ms < 10) { return "00" + ms; } else if (ms < 100) { return "0" + ms; } else { return ms; } }; var d = new Date(); var hh = checkTime(d.getHours()); var mm = checkTime(d.getMinutes()); var ss = checkTime(d.getSeconds()); var ms = checkMilliSeconds(d.getMilliseconds()); return '[' + hh + ':' + mm + ':' + ss + '.' + ms + ']'; }; Logger.WriteHtml(logHtml, textLog); }Как сделать импорт контента ?
-
Копнул форму ввода текста TEXTAREA Facebook в группе для публикации постов.
Вот кракозябры которыми питается это чудовище.
<div class="_4bl9"><div> <div class="_1mwp _395 _1mwq _5bu_ _5yk1" role="presentation"> <div class="_5yk2" tabindex="-2"> <div class="_5rp7"> <div class="_1p1t"> <div class="_1p1v" id="placeholder-4t9gu"> <em class="_4qba" data-intl-translation="Напишите что-нибудь..." data-intl-trid=""><!-- react-text: 168 -->Напишите что-нибудь...<!-- /react-text --></em> </div> </div> <div class="_5rpb"> <div aria-autocomplete="list" aria-describedby="placeholder-4t9gu" aria-expanded="false" aria-haspopup="false" aria-owns="js_48" class="_5rpu" data-testid="status-attachment-mentions-input" role="combobox" spellcheck="true" style="outline: medium none; white-space: pre-wrap; overflow-wrap: break-word;" contenteditable="true"> <div data-contents="true"> <div class="" data-block="true" data-editor="4t9gu" data-offset-key="bahl7-0-0"><div data-offset-key="bahl7-0-0" class="_1mf _1mj"><span data-offset-key="bahl7-0-0"><br data-text="true"></span> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> -
-
@freeliman said in Как сделать импорт контента ?:
сделал всё так как вы показали в примере. Текст напечатался, он его выделил, вырезал и вставил. Пазы 1 сек.
Но превью так и не загрузилась в БАС !
Срочно нужна ваша помощь в решение данной проблемы.Хотелось бы увидеть тестовый проект
-
@freeliman said in Как сделать импорт контента ?:
Тестирую публикацию в группах !
Видимо там стоит какая то защита. БАС Не загружает ПРЕВЬЮ и не ПУБЛИКУЕТ посты !Вроде работает. Вот даже видео снял
https://youtu.be/ai3g59iyBPM -
@support Вы делаете в комментарии публикацию. А я вам говорю про группу.
Вот попробуйте вступить в группу и сделать публикацию.https://www.facebook.com/groups/1764952417083656/
Мало того что он не импортирует контент, так ещё и при вводе текста пишет что типа контент не найден и нечего публиковать. Хотя текст внутри написан !

