mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-11-22 23:37:43 +01:00
Update content of files
This commit is contained in:
parent
5dd9d5a0db
commit
044ca0edeb
4 changed files with 47 additions and 8 deletions
|
@ -170,6 +170,7 @@ a:hover .emoji > b {
|
|||
height: 1.25em;
|
||||
vertical-align: top;
|
||||
display: inline-block;
|
||||
box-sizing: content-box;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
|
|
@ -649,9 +649,13 @@ var NewAd = {
|
|||
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.excludePoliticCheckbox.on('change.curPage', NewAd.onExcludeChannelTopicChange);
|
||||
state.onlyPoliticCheckbox = state.$form.field('only_politic');
|
||||
state.onlyPoliticCheckbox.on('change.curPage', NewAd.onOnlyPoliticChange);
|
||||
state.onlyPoliticCheckbox.on('change.curPage', NewAd.onOnlyChannelTopicChange);
|
||||
state.excludeCryptoCheckbox = state.$form.field('exclude_crypto');
|
||||
state.excludeCryptoCheckbox.on('change.curPage', NewAd.onExcludeChannelTopicChange);
|
||||
state.onlyCryptoCheckbox = state.$form.field('only_crypto');
|
||||
state.onlyCryptoCheckbox.on('change.curPage', NewAd.onOnlyChannelTopicChange);
|
||||
state.activeRadio = state.$form.field('active');
|
||||
state.activeRadio.fieldEl().on('change.curPage', NewAd.onActiveChange);
|
||||
state.useScheduleCheckbox = state.$form.field('use_schedule');
|
||||
|
@ -737,16 +741,20 @@ var NewAd = {
|
|||
NewAd.updateAdTargetOverview();
|
||||
NewAd.saveDraftAuto(true);
|
||||
},
|
||||
onExcludePoliticChange: function() {
|
||||
onExcludeChannelTopicChange: function() {
|
||||
if ($(this).prop('checked')) {
|
||||
Aj.state.onlyPoliticCheckbox.prop('checked', false);
|
||||
Aj.state.onlyCryptoCheckbox.prop('checked', false);
|
||||
}
|
||||
NewAd.updateAdTargetOverview();
|
||||
NewAd.saveDraftAuto(true);
|
||||
},
|
||||
onOnlyPoliticChange: function() {
|
||||
onOnlyChannelTopicChange: function() {
|
||||
if ($(this).prop('checked')) {
|
||||
Aj.state.excludePoliticCheckbox.prop('checked', false);
|
||||
Aj.state.excludePoliticCheckbox.not(this).prop('checked', false);
|
||||
Aj.state.excludeCryptoCheckbox.not(this).prop('checked', false);
|
||||
Aj.state.onlyPoliticCheckbox.not(this).prop('checked', false);
|
||||
Aj.state.onlyCryptoCheckbox.not(this).prop('checked', false);
|
||||
}
|
||||
NewAd.updateAdTargetOverview();
|
||||
NewAd.saveDraftAuto(true);
|
||||
|
@ -2133,6 +2141,8 @@ var NewAd = {
|
|||
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>';
|
||||
} else if (Aj.state.onlyCryptoCheckbox.prop('checked')) {
|
||||
overview += '<div class="pr-form-info-block plus">' + l('WEB_AD_TARGET_USERS_ONLY_CRYPTO', {target: user_targets}) + '</div>';
|
||||
} else {
|
||||
overview += '<div class="pr-form-info-block plus">' + l('WEB_AD_TARGET_USERS', {target: user_targets}) + '</div>';
|
||||
}
|
||||
|
@ -2148,6 +2158,9 @@ var NewAd = {
|
|||
if (Aj.state.excludePoliticCheckbox.prop('checked')) {
|
||||
overview += '<div class="pr-form-info-block minus">' + l('WEB_AD_TARGET_EXCLUDE_POLITIC') + '</div>';
|
||||
}
|
||||
if (Aj.state.excludeCryptoCheckbox.prop('checked')) {
|
||||
overview += '<div class="pr-form-info-block minus">' + l('WEB_AD_TARGET_EXCLUDE_CRYPTO') + '</div>';
|
||||
}
|
||||
}
|
||||
$('.js-exclude-outside').addClass('hide');
|
||||
} else {
|
||||
|
@ -2202,6 +2215,12 @@ var NewAd = {
|
|||
if ($form.field('only_politic').prop('checked')) {
|
||||
values.push('only_politic');
|
||||
}
|
||||
if ($form.field('exclude_crypto').prop('checked')) {
|
||||
values.push('exclude_crypto');
|
||||
}
|
||||
if ($form.field('only_crypto').prop('checked')) {
|
||||
values.push('only_crypto');
|
||||
}
|
||||
if ($form.field('exclude_outside').prop('checked')) {
|
||||
values.push('exclude_outside');
|
||||
}
|
||||
|
@ -2314,6 +2333,12 @@ var NewAd = {
|
|||
if ($form.field('only_politic').prop('checked')) {
|
||||
params.only_politic = 1;
|
||||
}
|
||||
if ($form.field('exclude_crypto').prop('checked')) {
|
||||
params.exclude_crypto = 1;
|
||||
}
|
||||
if ($form.field('only_crypto').prop('checked')) {
|
||||
params.only_crypto = 1;
|
||||
}
|
||||
if ($form.field('exclude_outside').prop('checked')) {
|
||||
params.exclude_outside = 1;
|
||||
}
|
||||
|
@ -2429,6 +2454,12 @@ var NewAd = {
|
|||
if ($form.field('only_politic').prop('checked')) {
|
||||
params.only_politic = 1;
|
||||
}
|
||||
if ($form.field('exclude_crypto').prop('checked')) {
|
||||
params.exclude_crypto = 1;
|
||||
}
|
||||
if ($form.field('only_crypto').prop('checked')) {
|
||||
params.only_crypto = 1;
|
||||
}
|
||||
if ($form.field('exclude_outside').prop('checked')) {
|
||||
params.exclude_outside = 1;
|
||||
}
|
||||
|
@ -2489,6 +2520,8 @@ var NewAd = {
|
|||
}
|
||||
$form.field('exclude_politic').prop('checked', false);
|
||||
$form.field('only_politic').prop('checked', false);
|
||||
$form.field('exclude_crypto').prop('checked', false);
|
||||
$form.field('only_crypto').prop('checked', false);
|
||||
$form.field('exclude_outside').prop('checked', false);
|
||||
$form.field('device').trigger('selectval', ['']);
|
||||
Aj.state.titleField.focusAndSelect();
|
||||
|
|
|
@ -1899,7 +1899,7 @@
|
|||
window.open(url, '_blank');
|
||||
}
|
||||
};
|
||||
WebApp.openTelegramLink = function (url) {
|
||||
WebApp.openTelegramLink = function (url, options) {
|
||||
var a = document.createElement('A');
|
||||
a.href = url;
|
||||
if (a.protocol != 'http:' &&
|
||||
|
@ -1912,8 +1912,13 @@
|
|||
throw Error('WebAppTgUrlInvalid');
|
||||
}
|
||||
var path_full = a.pathname + a.search;
|
||||
options = options || {};
|
||||
if (isIframe || versionAtLeast('6.1')) {
|
||||
WebView.postEvent('web_app_open_tg_link', false, {path_full: path_full});
|
||||
var req_params = {path_full: path_full};
|
||||
if (options.force_request) {
|
||||
req_params.force_request = true;
|
||||
}
|
||||
WebView.postEvent('web_app_open_tg_link', false, req_params);
|
||||
} else {
|
||||
location.href = 'https://t.me' + path_full;
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
</ul>
|
||||
<ul>
|
||||
<li><a href="javascript:DemoApp.setEmojiStatus(this, '5213305508034783384');">Set emoji status</a> <span></span></li>
|
||||
<li><a href="javascript:DemoApp.setEmojiStatus(this, '5213305508034783384', 1731348246);">Set emoji status</a> for 5 min <span></span></li>
|
||||
<li><a href="javascript:DemoApp.setEmojiStatus(this, '5213305508034783384', 1731348946);">Set emoji status</a> for 5 min <span></span></li>
|
||||
<li><a href="javascript:DemoApp.setEmojiStatus(this, '123');">Set emoji status</a> (invalid id) <span></span></li>
|
||||
</ul>
|
||||
<p>Test permissions:</p>
|
||||
|
|
Loading…
Reference in a new issue