Update content of files

This commit is contained in:
GitHub Action 2023-12-15 19:33:15 +00:00
parent 5885447256
commit 6dc6cb822a
4 changed files with 160 additions and 93 deletions

View file

@ -0,0 +1,132 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Similar channels</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="The API offers a method to obtain a list of similarly themed public channels, selected based on similarities in their subscriber bases.">
<meta property="og:title" content="Similar channels">
<meta property="og:image" content="">
<meta property="og:description" content="The API offers a method to obtain a list of similarly themed public channels, selected based on similarities in their subscriber bases.">
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16x16.png">
<link rel="alternate icon" href="/img/favicon.ico" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?236" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/recommend" >Similar channels</a></li></ul></div>
<h1 id="dev_page_title">Similar channels</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>The API offers a method to obtain a list of similarly themed public channels, selected based on similarities in their <strong>subscriber bases</strong>. </p>
<p>Scheme:</p>
<pre><code><a href='/constructor/messages.chats'>messages.chats</a>#64ff9fd5 chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Chat'>Chat</a>&gt; = <a href='/type/messages.Chats'>messages.Chats</a>;
<a href='/constructor/messages.chatsSlice'>messages.chatsSlice</a>#9cd81144 count:<a href='/type/int'>int</a> chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Chat'>Chat</a>&gt; = <a href='/type/messages.Chats'>messages.Chats</a>;
---functions---
<a href='/method/channels.getChannelRecommendations'>channels.getChannelRecommendations</a>#83b70d97 channel:<a href='/type/InputChannel'>InputChannel</a> = <a href='/type/messages.Chats'>messages.Chats</a>;</code></pre>
<p>Clients should invoke this method after joining a <a href="/api/channel">channel</a>, automatically displaying a popup with a list of similarly themed channels. </p>
<p>The same method should also be invoked when opening a special "Similar channels" tab in the channel's profile (similar to the Media/Links/Gifs/etc tabs).</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/privacy">Privacy</a></li>
<li><a href="//telegram.org/press">Press</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/android">Android</a></li>
<li><a href="//telegram.org/dl/web">Mobile Web</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="//core.telegram.org/">Platform</a></h5>
<ul>
<li><a href="//core.telegram.org/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="//core.telegram.org/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/press">Press</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?47"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js?1"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>

View file

@ -1048,9 +1048,7 @@ var Assets = {
username: username,
auction: true
}, function(result) {
if (result.error) {
return showAlert(result.error);
} else if (result.confirm_message) {
if (result.confirm_message) {
showConfirm(result.confirm_message, function() {
doPutToAuction();
}, result.confirm_button);
@ -1150,9 +1148,7 @@ var Assets = {
username: username,
auction: false
}, function(result) {
if (result.error) {
return showAlert(result.error);
} else if (result.confirm_message) {
if (result.confirm_message) {
showConfirm(result.confirm_message, function() {
doSellUsername();
}, result.confirm_button);

View file

@ -2218,6 +2218,12 @@ a.pr-account-button-wrap:focus {
.field-readonly .pr-form-control-wrap:after {
display: none;
}
.pr-form-control-wrap.has-locked .input,
.pr-form-control-wrap.has-locked input.form-control,
.pr-form-control-wrap.has-locked .select {
padding-right: 40px;
text-overflow: ellipsis;
}
.pr-form-control-wrap.has-photo .pr-form-control,
.pr-form-control-wrap.has-progress.field-loading .pr-form-control {
padding-right: 48px;

View file

@ -401,7 +401,6 @@ var Ads = {
}
},
onBlur: function(value) {
options.onBlur && options.onBlur(field, options.getDataOpts);
options.onEnter && options.onEnter(field, value);
},
onEnter: function(value) {
@ -497,7 +496,6 @@ var NewAd = {
field: selectData.field,
c_field: selectData.c_field,
},
onBlur: NewAd.onLocationSelectBlur,
onUpdate: NewAd.onSelectUpdate,
onChange: NewAd.onLocationSelectChange
});
@ -529,14 +527,10 @@ var NewAd = {
state.targetTypeField.fieldEl().on('change.curPage', NewAd.onTargetTypeChange);
state.pictureCheckbox = state.$form.field('picture');
state.pictureCheckbox.on('change.curPage', NewAd.onPictureChange);
state.intersectTopicsCheckbox = state.$form.field('intersect_topics');
state.intersectTopicsCheckbox.on('change.curPage', NewAd.onIntersectTopicsChange);
state.excludePoliticCheckbox = state.$form.field('exclude_politic');
state.excludePoliticCheckbox.on('change.curPage', NewAd.onExcludePoliticChange);
state.onlyPoliticCheckbox = state.$form.field('only_politic');
state.onlyPoliticCheckbox.on('change.curPage', NewAd.onOnlyPoliticChange);
state.deviceField = state.$form.field('device');
state.deviceField.on('ddchange.curPage', NewAd.onDeviceChange);
state.confirmedCheckbox = state.$form.field('confirmed');
state.confirmedCheckbox.on('change.curPage', NewAd.onConfirmedChange);
NewAd.updateAdPreview(state.$form, state.previewData);
@ -573,10 +567,8 @@ var NewAd = {
state.targetTypeField.fieldEl().off('.curPage');
state.confirmedCheckbox.off('.curPage');
state.pictureCheckbox.off('.curPage');
state.intersectTopicsCheckbox.off('.curPage');
state.excludePoliticCheckbox.off('.curPage');
state.onlyPoliticCheckbox.off('.curPage');
state.deviceField.off('.curPage');
for (var i = 0; i < state.selectList.length; i++) {
var selectData = state.selectList[i];
if (selectData.location_search) {
@ -605,10 +597,6 @@ var NewAd = {
var $form = $(this.form);
NewAd.adPostCheck($form);
},
onIntersectTopicsChange: function() {
NewAd.updateAdTargetOverview();
NewAd.saveDraftAuto(true);
},
onExcludePoliticChange: function() {
if ($(this).prop('checked')) {
Aj.state.onlyPoliticCheckbox.prop('checked', false);
@ -672,13 +660,6 @@ var NewAd = {
Ads.hideFieldError(buttonField);
NewAd.adPostCheck($form);
},
onDeviceChange: function() {
var $form = $(this).parents('form');
var devideField = $form.field('devide');
Ads.hideFieldError(devideField);
NewAd.updateAdTargetOverview();
NewAd.saveDraftAuto(true);
},
adPostCheck: function($form, try_index) {
var textField = $form.field('text');
var promoteUrlField = $form.field('promote_url');
@ -686,7 +667,6 @@ var NewAd = {
var websiteNameField = $form.field('website_name');
var websitePhotoField = $form.field('website_photo');
var cpmField = $form.field('cpm');
var deviceField = $form.field('device');
var text = textField.value();
var promote_url = promoteUrlField.value();
var button = buttonField.data('value');
@ -694,7 +674,6 @@ var NewAd = {
var website_photo = websitePhotoField.value();
var $formGroup = promoteUrlField.fieldEl().parents('.form-group');
var $cpmFormGroup = cpmField.fieldEl().parents('.form-group');
var device = deviceField.data('value');
if (!text && !promote_url) {
return false;
}
@ -704,8 +683,7 @@ var NewAd = {
promote_url: promote_url,
button: button,
website_name: website_name,
website_photo: website_photo,
device: device
website_photo: website_photo
};
if (Aj.state.adId) {
params.ad_id = Aj.state.adId;
@ -934,17 +912,6 @@ var NewAd = {
});
return false;
},
onLocationSelectBlur: function(field, opts) {
var $form = Aj.state.$form;
var $cFieldEl = $form.field(opts.c_field);
var c_value = $cFieldEl.data('value');
if (c_value.join) {
if (c_value.length > 1) {
Ads.hideFieldError($cFieldEl);
return false;
}
}
},
onLocationSelectChange: function(field, value, valueFull) {
var $fieldEl = Aj.state.$form.field(field);
Ads.hideFieldError($fieldEl);
@ -952,12 +919,11 @@ var NewAd = {
onSelectUpdate: function(field, value, valueFull) {
var $fieldEl = Aj.state.$form.field(field);
if (field == 'user_topics') {
var user_topics_cnt = $fieldEl.data('value').length;
if (user_topics_cnt > 1) {
$('.js-intersect-topics-wrap', Aj.state.$form).slideShow();
} else {
$('.js-intersect-topics-wrap', Aj.state.$form).slideHide();
var has_user_topics = $fieldEl.data('value').length > 0;
if (has_user_topics) {
Aj.state.onlyPoliticCheckbox.prop('checked', false);
}
Aj.state.onlyPoliticCheckbox.prop('disabled', has_user_topics);
}
var selOpts = $fieldEl.data('selOpts');
var paired_field = selOpts.pairedField;
@ -1226,18 +1192,6 @@ var NewAd = {
updateAdTargetOverview: function() {
var len = {}, lang_params = {}, need_outside_cb = false;
var target_type = Aj.state.$form.field('target_type').value();
var joinTargets = function(list, or, repeat) {
var lk = or ? 'WEB_AD_TARGET_OR' : 'WEB_AD_TARGET_AND';
if (repeat && list.length > 2) {
var last_item = list.pop();
return l(lk, {item1: joinTargets(list, or, repeat), item2: last_item});
}
if (list.length > 1) {
var last_item = list.pop();
list[list.length - 1] = l(lk, {item1: list[list.length - 1], item2: last_item});
}
return list.join(', ');
};
for (var i = 0; i < Aj.state.selectList.length; i++) {
var selectData = Aj.state.selectList[i];
var field = selectData.field;
@ -1254,16 +1208,16 @@ var NewAd = {
need_outside_cb = true;
}
}
var list_or = (field == 'langs' || field == 'topics' || field == 'countries' || field == 'locations' || field == 'user_langs' || field == 'user_topics' && !Aj.state.intersectTopicsCheckbox.prop('checked') || field == 'user_channels' || field == 'audiences')
lang_params[field] = joinTargets(list, list_or);
if (list.length > 1) {
var last_item = list.pop();
list[list.length - 1] = l('WEB_AD_TARGET_AND', {item1: list[list.length - 1], item2: last_item});
}
lang_params[field] = list.join(', ');
} else {
lang_params[field] = '';
}
Ads.hideFieldError($field);
}
len.device = Aj.state.$form.field('device').data('value');
lang_params.device = '<span class="value" dir="auto">' + Aj.state.$form.field('device').html() + '</span>';
var overview = '';
if (target_type == 'channels') {
if ((len.langs || len.topics) && len.channels) {
@ -1316,33 +1270,27 @@ var NewAd = {
if (len.user_topics > 0) {
user_targets.push(l('WEB_AD_TARGET_USER_TOPICS', lang_params));
}
if (len.user_channels > 0) {
user_targets.push(l('WEB_AD_TARGET_USER_CHANNELS', lang_params));
}
if (len.audiences > 0) {
user_targets.push(l('WEB_AD_TARGET_AUDIENCES', lang_params));
}
if (len.device) {
user_targets.push(l('WEB_AD_TARGET_DEVICE', lang_params));
if (user_targets.length > 1) {
var last_user_target = user_targets.pop();
user_targets[user_targets.length - 1] = l('WEB_AD_TARGET_AND', {item1: user_targets[user_targets.length - 1], item2: last_user_target});
}
user_targets = joinTargets(user_targets, false, true);
if (Aj.state.onlyPoliticCheckbox.prop('checked')) {
overview += '<div class="pr-form-info-block plus">' + l('WEB_AD_TARGET_USERS_ONLY_POLITIC', {target: user_targets}) + '</div>';
overview += '<div class="pr-form-info-block plus">' + l('WEB_AD_TARGET_USERS_ONLY_POLITIC', {target: user_targets.join(', ')}) + '</div>';
} else {
overview += '<div class="pr-form-info-block plus">' + l('WEB_AD_TARGET_USERS', {target: user_targets}) + '</div>';
overview += '<div class="pr-form-info-block plus">' + l('WEB_AD_TARGET_USERS', {target: user_targets.join(', ')}) + '</div>';
}
if (len.exclude_user_topics > 0) {
overview += '<div class="pr-form-info-block minus">' + l('WEB_AD_TARGET_USER_EXCLUDE_TOPICS', lang_params) + '</div>';
}
if (len.exclude_user_channels > 0) {
overview += '<div class="pr-form-info-block minus">' + l('WEB_AD_TARGET_USER_EXCLUDE_CHANNELS', lang_params) + '</div>';
if (Aj.state.excludePoliticCheckbox.prop('checked')) {
overview += '<div class="pr-form-info-block minus">' + l('WEB_AD_TARGET_EXCLUDE_POLITIC') + '</div>';
}
if (len.exclude_audiences > 0) {
overview += '<div class="pr-form-info-block minus">' + l('WEB_AD_TARGET_EXCLUDE_AUDIENCES', lang_params) + '</div>';
}
if (Aj.state.excludePoliticCheckbox.prop('checked')) {
overview += '<div class="pr-form-info-block minus">' + l('WEB_AD_TARGET_EXCLUDE_POLITIC') + '</div>';
}
}
$('.js-exclude-outside').addClass('hide');
} else {
@ -1364,8 +1312,7 @@ var NewAd = {
$form.field('cpm').value(),
$form.field('views_per_user').value(),
$form.field('budget').value(),
$form.field('target_type').value(),
$form.field('device').data('value')
$form.field('target_type').value()
];
if ($form.field('picture').prop('checked')) {
values.push('picture');
@ -1375,9 +1322,6 @@ var NewAd = {
var vals = $form.field(selectData.field).data('value') || [];
values.push(vals.join(';'));
}
if ($form.field('intersect_topics').prop('checked')) {
values.push('intersect_topics');
}
if ($form.field('exclude_politic').prop('checked')) {
values.push('exclude_politic');
}
@ -1423,7 +1367,6 @@ var NewAd = {
var views_per_user = $form.field('views_per_user').value();
var budget = Ads.amountFieldValue($form, 'budget');
var target_type = $form.field('target_type').value();
var device = $form.field('device').data('value');
if (!title.length) {
$form.field('title').focus();
@ -1457,8 +1400,7 @@ var NewAd = {
cpm: cpm,
views_per_user: views_per_user,
budget: budget,
target_type: target_type,
device: device
target_type: target_type
};
if ($form.field('picture').prop('checked')) {
params.picture = 1;
@ -1468,9 +1410,6 @@ var NewAd = {
var values = $form.field(selectData.field).data('value') || [];
params[selectData.field] = values.join(';');
}
if ($form.field('intersect_topics').prop('checked')) {
params.intersect_topics = 1;
}
if ($form.field('exclude_politic').prop('checked')) {
params.exclude_politic = 1;
}
@ -1526,7 +1465,6 @@ var NewAd = {
var views_per_user = $form.field('views_per_user').value();
var budget = Ads.amountFieldValue($form, 'budget');
var target_type = $form.field('target_type').value();
var device = $form.field('device').data('value');
var curFormData = NewAd.getFormData($form);
if (Aj.state.initFormData == curFormData) {
@ -1544,8 +1482,7 @@ var NewAd = {
cpm: cpm,
views_per_user: views_per_user,
budget: budget,
target_type: target_type,
device: device
target_type: target_type
};
if ($form.field('picture').prop('checked')) {
params.picture = 1;
@ -1555,9 +1492,6 @@ var NewAd = {
var values = $form.field(selectData.field).data('value') || [];
params[selectData.field] = values.join(';');
}
if ($form.field('intersect_topics').prop('checked')) {
params.intersect_topics = 1;
}
if ($form.field('exclude_politic').prop('checked')) {
params.exclude_politic = 1;
}
@ -1600,7 +1534,6 @@ var NewAd = {
$form.field('exclude_politic').prop('checked', false);
$form.field('only_politic').prop('checked', false);
$form.field('exclude_outside').prop('checked', false);
$form.field('device').trigger('selectval', ['']);
Aj.state.titleField.focusAndSelect();
NewAd.updateAdPreview(Aj.state.$form, false);
var curFormData = NewAd.getFormData($form);