Added changeling
This commit is contained in:
parent
f7c4312f03
commit
7bdba384c9
@ -1146,7 +1146,7 @@ angular.module('izhukov.utils', [])
|
|||||||
var soundcloudRegExp = /^https?:\/\/(?:soundcloud\.com|snd\.sc)\/([a-zA-Z0-9%\-\_]+)\/([a-zA-Z0-9%\-\_]+)/i;
|
var soundcloudRegExp = /^https?:\/\/(?:soundcloud\.com|snd\.sc)\/([a-zA-Z0-9%\-\_]+)\/([a-zA-Z0-9%\-\_]+)/i;
|
||||||
var spotifyRegExp = /(https?:\/\/(open\.spotify\.com|play\.spotify\.com|spoti\.fi)\/(.+)|spotify:(.+))/i;
|
var spotifyRegExp = /(https?:\/\/(open\.spotify\.com|play\.spotify\.com|spoti\.fi)\/(.+)|spotify:(.+))/i;
|
||||||
|
|
||||||
var markdownRegExp = /(^|\n)```(.{0,16})\n([\s\S]+?)\n```(\n|$)|(^|\s)`([^\n]+?)`/;
|
var markdownRegExp = /(^|\s)```([\s\S]+?)```|(^|\s)`([^\n]+?)`/;
|
||||||
|
|
||||||
var siteHashtags = {
|
var siteHashtags = {
|
||||||
Telegram: '#/im?q=%23{1}',
|
Telegram: '#/im?q=%23{1}',
|
||||||
@ -1319,26 +1319,32 @@ angular.module('izhukov.utils', [])
|
|||||||
var raw = text;
|
var raw = text;
|
||||||
var match;
|
var match;
|
||||||
var newText = [];
|
var newText = [];
|
||||||
|
var rawOffset = 0;
|
||||||
|
var matchIndex;
|
||||||
while (match = raw.match(markdownRegExp)) {
|
while (match = raw.match(markdownRegExp)) {
|
||||||
|
matchIndex = rawOffset + match.index;
|
||||||
newText.push(raw.substr(0, match.index));
|
newText.push(raw.substr(0, match.index));
|
||||||
|
|
||||||
if (match[3]) { // pre
|
if (match[2]) { // pre
|
||||||
newText.push(match[1] + match[3] + match[4]);
|
newText.push(match[1] + match[2]);
|
||||||
entities.push({
|
entities.push({
|
||||||
_: 'messageEntityPre',
|
_: 'messageEntityPre',
|
||||||
language: match[2] || '',
|
language: '',
|
||||||
offset: match.index + match[1].length,
|
offset: matchIndex + match[1].length,
|
||||||
length: match[3].length
|
length: match[2].length
|
||||||
})
|
});
|
||||||
|
rawOffset -= 6;
|
||||||
} else { // code
|
} else { // code
|
||||||
newText.push(match[5] + match[6]);
|
newText.push(match[3] + match[4]);
|
||||||
entities.push({
|
entities.push({
|
||||||
_: 'messageEntityCode',
|
_: 'messageEntityCode',
|
||||||
offset: match.index + match[5].length,
|
offset: matchIndex + match[3].length,
|
||||||
length: match[6].length
|
length: match[4].length
|
||||||
})
|
});
|
||||||
|
rawOffset -= 2;
|
||||||
}
|
}
|
||||||
raw = raw.substr(match.index + match[0].length);
|
raw = raw.substr(match.index + match[0].length);
|
||||||
|
rawOffset += match.index + match[0].length;
|
||||||
}
|
}
|
||||||
newText.push(raw);
|
newText.push(raw);
|
||||||
return newText.join('');
|
return newText.join('');
|
||||||
|
@ -38,6 +38,14 @@ h1, h2, h3, h4, h5 {
|
|||||||
.user-select(text);
|
.user-select(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
margin-bottom: 0;
|
||||||
|
max-height: 300px;
|
||||||
|
overflow: auto;
|
||||||
|
padding: 3px;
|
||||||
|
border: 1px solid #dedede;
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
@ -2049,12 +2057,6 @@ a.im_message_fwd_photo {
|
|||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
line-height: 150%;
|
line-height: 150%;
|
||||||
}
|
}
|
||||||
.im_message_text pre {
|
|
||||||
margin-bottom: 0;
|
|
||||||
max-height: 300px;
|
|
||||||
overflow: auto;
|
|
||||||
padding: 4px;
|
|
||||||
}
|
|
||||||
.im_message_photo_caption,
|
.im_message_photo_caption,
|
||||||
.im_message_video_caption {
|
.im_message_video_caption {
|
||||||
clear: both;
|
clear: both;
|
||||||
@ -3984,12 +3986,12 @@ a.countries_modal_search_clear {
|
|||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
.im_dialogs_col_wrap,
|
body .im_dialogs_col_wrap,
|
||||||
.im_bottom_panel_wrap,
|
body .im_bottom_panel_wrap,
|
||||||
.tg_head_logo_wrap,
|
body .tg_head_logo_wrap,
|
||||||
.tg_head_msgs_edit_btn,
|
body .tg_head_msgs_edit_btn,
|
||||||
.tg_head_peer_return_btn,
|
body .tg_head_peer_return_btn,
|
||||||
.tg_head_peer_dropdown {
|
body .tg_head_peer_dropdown {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
body .im_history_wrap {
|
body .im_history_wrap {
|
||||||
@ -4001,6 +4003,16 @@ a.countries_modal_search_clear {
|
|||||||
body .nano > .nano-content {
|
body .nano > .nano-content {
|
||||||
position: static;
|
position: static;
|
||||||
}
|
}
|
||||||
|
body .tg_head_peer_info {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
body .im_history_col_wrap,
|
||||||
|
body .tg_head_main_wrap {
|
||||||
|
width: auto;
|
||||||
|
max-width: 700px;
|
||||||
|
float: none;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,6 +31,18 @@
|
|||||||
|
|
||||||
<div class="md_modal_sections">
|
<div class="md_modal_sections">
|
||||||
|
|
||||||
|
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.4.8')">
|
||||||
|
<div class="md_modal_section_version">0.4.8</div>
|
||||||
|
<div class="md_modal_section_description changelog_version_changes">
|
||||||
|
<ul class="list-unstyled changelog_version_changes_list">
|
||||||
|
<li>Introducing Channels – a great new way to broadcast your messages to unlimited audiences.</li>
|
||||||
|
<li>Check out the <a href="https://telegram.org/blog/channels" target="_blank">Telegram Blog</a> for more info</li>
|
||||||
|
<li>Improved performance in Safari on OS X El Capitan.</li>
|
||||||
|
<li>Added formatting for fixed-width code, surround text with `single backticks` for inline text and ```triple backticks``` for blocks of pre-formatted text.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.4.7')">
|
<div class="md_modal_versioned_section_wrap" ng-if="canShowVersion('0.4.7')">
|
||||||
<div class="md_modal_section_version">0.4.7</div>
|
<div class="md_modal_section_version">0.4.7</div>
|
||||||
<div class="md_modal_section_description changelog_version_changes">
|
<div class="md_modal_section_description changelog_version_changes">
|
||||||
|
@ -19,9 +19,23 @@
|
|||||||
|
|
||||||
<div class="modal_section changelog_version_wrap">
|
<div class="modal_section changelog_version_wrap">
|
||||||
<h3 class="modal_section_header changelog_version_title">
|
<h3 class="modal_section_header changelog_version_title">
|
||||||
Version 0.4.7
|
Version 0.4.8
|
||||||
<span class="pull-right" my-i18n="changelog_modal_title_current_version"></span>
|
<span class="pull-right" my-i18n="changelog_modal_title_current_version"></span>
|
||||||
</h3>
|
</h3>
|
||||||
|
<div class="modal_section_body changelog_version_changes">
|
||||||
|
<ul class="list-unstyled changelog_version_changes_list">
|
||||||
|
<li>Introducing Channels – a great new way to broadcast your messages to unlimited audiences.</li>
|
||||||
|
<li>Check out the <a href="https://telegram.org/blog/channels" target="_blank">Telegram Blog</a> for more info</li>
|
||||||
|
<li>Improved performance in Safari on OS X El Capitan.</li>
|
||||||
|
<li>Added formatting for fixed-width code, surround text with `single backticks` for inline text and ```triple backticks``` for blocks of pre-formatted text.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal_section changelog_version_wrap">
|
||||||
|
<h3 class="modal_section_header changelog_version_title">
|
||||||
|
Version 0.4.7
|
||||||
|
</h3>
|
||||||
<div class="modal_section_body changelog_version_changes">
|
<div class="modal_section_body changelog_version_changes">
|
||||||
<ul class="list-unstyled changelog_version_changes_list">
|
<ul class="list-unstyled changelog_version_changes_list">
|
||||||
<li>New bot API, free for everyone. If you're an engineer, create your own bots for games, services or integrations.
|
<li>New bot API, free for everyone. If you're an engineer, create your own bots for games, services or integrations.
|
||||||
|
Loading…
Reference in New Issue
Block a user