mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-28 07:20:31 +01:00
354 lines
24 KiB
HTML
354 lines
24 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<title>Telegram Ads</title>
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||
<meta name="format-detection" content="telephone=no" />
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||
<meta name="MobileOptimized" content="176" />
|
||
<meta name="HandheldFriendly" content="True" /><meta name="twitter:card" content="summary"></meta>
|
||
<meta property="og:title" content="Ad Policies and Guidelines">
|
||
<meta property="og:description" content="These Ad Policies and Guidelines apply to all ads displayed on the Telegram Ad Platform and describe what ad content is…">
|
||
|
||
<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" />
|
||
<script>document.cookie="stel_dt="+encodeURIComponent((new Date).getTimezoneOffset())+";path=/;max-age=31536000;samesite=None;secure"</script>
|
||
|
||
<link href="//telegram.org/css/font-roboto.css?1" rel="stylesheet" type="text/css">
|
||
<link href="//telegram.org/css/bootstrap.min.css?3" rel="stylesheet">
|
||
<link href="//telegram.org/css/bootstrap-extra.css?2" rel="stylesheet">
|
||
<link href="/css/telegram.css?236" rel="stylesheet">
|
||
<link href="/css/widget-frame.css?66" rel="stylesheet">
|
||
<link href="/css/promote.css?77" rel="stylesheet">
|
||
<link href="/css/jquery-ui.min.css?1" rel="stylesheet">
|
||
<link href="/css/tchart.min.css?10" rel="stylesheet">
|
||
|
||
</head>
|
||
<body class="emoji_image no-transition">
|
||
|
||
<div id="aj_progress" class="progress-bar"></div>
|
||
|
||
<div id="aj_content"><div class="pr-container pr-docs-container">
|
||
<div class="pr-header">
|
||
<div class="pr-header-auth">
|
||
<div class="pr-header-auth-item"><a class="header-auth-link login-link" href="/auth">Log In</a></div>
|
||
</div>
|
||
<ol class="pr-breadcrumb"><li class="pr-logo compact"><a href="/"><i class="pr-icon"></i><span class="pr-logo-title">Telegram Ads</span></a></li><li class="pr-breadcrumb-item">Ad Policies and Guidelines</li></ol>
|
||
</div>
|
||
<section class="pr-content"><div id="dev_page_content_wrap" class=" ">
|
||
<div class="dev_page_bread_crumbs"></div>
|
||
<h1 id="dev_page_title">Ad Policies and Guidelines</h1>
|
||
|
||
<div id="dev_page_content"><!-- scroll_nav -->
|
||
|
||
<p>These Ad Policies and Guidelines apply to all ads displayed on the Telegram Ad Platform and describe what ad content is allowed on Telegram.</p>
|
||
<p>Advertisers are responsible for their ads and for complying with:</p>
|
||
<ul>
|
||
<li>these Ad Policies and Guidelines</li>
|
||
<li><a href="https://promote.telegram.org/tos">Telegram Ad Platform Terms of Service</a></li>
|
||
<li><a href="https://telegram.org/tos">Telegram Terms of Service</a> and</li>
|
||
<li><a href="https://telegram.org/privacy">Telegram Privacy Policy</a>.</li>
|
||
</ul>
|
||
<hr>
|
||
<h3><a class="anchor" name="1-ad-format" href="#1-ad-format"><i class="anchor-icon"></i></a>1. Ad format</h3>
|
||
<p>Each ad consists of an ad text and a button that opens a link to the advertised product. The maximum length of the ad text is <strong>160 characters</strong> including spaces.</p>
|
||
<h3><a class="anchor" name="2-editorial-requirements" href="#2-editorial-requirements"><i class="anchor-icon"></i></a>2. Editorial requirements</h3>
|
||
<p>Standard requirements of style, clarity, spelling and punctuation apply to all ads. Numbers, marks and symbols must be used properly. The following is not allowed:</p>
|
||
<ul>
|
||
<li>Profanity or vulgarity, <em>including slur acronyms and spelling variations, in any language, and masked vulgarity (e.g., f**k)</em></li>
|
||
<li>Unrecognizable or unclear meaning, <em>such as overbroad or vague descriptions, repetition of words and phrases</em></li>
|
||
<li>Excessive or gimmicky use of CaPiTaLiZaTiOn, <strong>highlighting</strong>, s p a c i n g and s,y,m,b,o,l,s, <em>including Unicode art, ASCII art and box-drawing</em></li>
|
||
<li>Intrusive, excessive or gimmicky use of <strong>emoji</strong> and other emoticons</li>
|
||
<li>Line breaks, bullet points, numbering lists</li>
|
||
</ul>
|
||
<h3><a class="anchor" name="3-link-format" href="#3-link-format"><i class="anchor-icon"></i></a>3. Link format</h3>
|
||
<p>In addition to the main ad link submitted in the ‘URL’ field, ads may also include one optional link in the ad text itself, using the format the format <code>@link</code>, <code>t.me/link</code>, or <code>t.me/link/123</code>. The ad link and the link in the ad text must both lead to the same destination. If the destination is a Telegram bot, links may include <a href="https://core.telegram.org/bots/features#deep-linking">start parameters for the bot</a>.</p>
|
||
<p>Links must be used properly. Particularly, the following is not allowed:</p>
|
||
<ul>
|
||
<li>Using more than one link in the ad text</li>
|
||
<li>Adding external links to the ad text.</li>
|
||
<li>Using any unacceptable link formats, <em>such as URL shorteners or an IP-address in the place of the link, even if it ultimately leads to a valid destination</em></li>
|
||
</ul>
|
||
<h3><a class="anchor" name="4-destination-requirements" href="#4-destination-requirements"><i class="anchor-icon"></i></a>4. Destination requirements</h3>
|
||
<p>To keep all ads beneficial for both Telegram users and advertisers, these Ad Policies and Guidelines set out requirements for proper destinations.</p>
|
||
<h4><a class="anchor" name="4-1-destination-quality" href="#4-1-destination-quality"><i class="anchor-icon"></i></a>4.1. Destination quality</h4>
|
||
<p>Ad destinations must have quality, original content and provide a proper user experience. Particularly, the following applies:</p>
|
||
<ul>
|
||
<li>Telegram channels and bots must have both a profile image and a complete text in their ‘about’ or ‘description’ section.</li>
|
||
<li>Bots must be <em>beneficial</em> to the user and are expected to provide a user experience and interfaces that are consistent with the capabilities of the <a href="https://core.telegram.org/bots/features">Bot Platform</a>.</li>
|
||
<li>Destinations using excessive CAPITALIZATION, <strong>highlighting</strong>, emoji, punctuation (exclamation marks etc.) or strong language are not allowed.</li>
|
||
</ul>
|
||
<h4><a class="anchor" name="4-2-destination-functionality" href="#4-2-destination-functionality"><i class="anchor-icon"></i></a>4.2. Destination functionality</h4>
|
||
<p>Ad destinations must be functional, technically complete, and active. Particularly, the following applies:</p>
|
||
<ul>
|
||
<li>Empty or abandoned Telegram channels are not allowed as destinations.</li>
|
||
<li>Telegram channels must have had some activity at least once in the two weeks prior to review.</li>
|
||
<li>Destination bots must respond to commands properly on both mobile and desktop devices.</li>
|
||
<li>Inactive, expired and inaccessible websites are not allowed. This covers websites “under construction”, websites returning error codes, preventing access by a paywall or login form, websites unavailable from targeted locations, and websites that fail to load.</li>
|
||
</ul>
|
||
<h4><a class="anchor" name="4-3-irrelevant-destinations" href="#4-3-irrelevant-destinations"><i class="anchor-icon"></i></a>4.3. Irrelevant destinations</h4>
|
||
<p>Destinations must match the ad text and may not be used only for redirecting to other landing pages. Particularly, the following is not allowed:</p>
|
||
<ul>
|
||
<li>Destinations not corresponding with the ad text, <em>e.g., cat food ads with links to an online clothing store</em></li>
|
||
<li>Mock destinations created solely for displaying other ads or collecting user data with “call me back” forms or similar</li>
|
||
<li>Mostly noninteractive bots designed to redirect elsewhere</li>
|
||
<li>Websites that automatically redirect users to a different webpage or domain, <em>e.g., through 302-redirect or .htaccess-redirect</em></li>
|
||
</ul>
|
||
<h4><a class="anchor" name="4-4-manipulation-of-content" href="#4-4-manipulation-of-content"><i class="anchor-icon"></i></a>4.4. Manipulation of content</h4>
|
||
<p>The contents of a destination may not be altered to scam users or evade moderation review. Advertisers using manipulated destinations may be suspended without notice. Particularly, the following is not allowed:</p>
|
||
<ul>
|
||
<li>Concealing or replacing the content of the destination to pass the ad review</li>
|
||
<li>Spoofing and cloaking, <em>such as when a destination imitates a legitimate website or uses names of other brands to mislead visitors</em></li>
|
||
</ul>
|
||
<h3><a class="anchor" name="5-prohibited-content" href="#5-prohibited-content"><i class="anchor-icon"></i></a>5. Prohibited content</h3>
|
||
<p>These Ad Policies and Guidelines prohibit some types of content to ensure a safe and pleasant experience for Telegram users. The following requirements apply to ads on the Telegram Ad Platform and to the products they promote, whether implied or explicit. <strong>All examples given are non-exhaustive.</strong></p>
|
||
<h4><a class="anchor" name="5-1-graphic-shocking-or-sexual-content" href="#5-1-graphic-shocking-or-sexual-content"><i class="anchor-icon"></i></a>5.1. Graphic, shocking, or sexual content</h4>
|
||
<p>Ads must not promote graphic, shocking, or sexual content, products and services.</p>
|
||
<p><strong>Examples:</strong></p>
|
||
<ul>
|
||
<li>Gruesome, disgusting, or shocking imagery, <em>including gore, bodily fluids, accident photos, graphic details of torture</em></li>
|
||
<li>Nudity, sexually explicit and sexually suggestive content, <em>including excessively exposed intimate body parts, sexual merchandize and entertainment, dating services</em></li>
|
||
</ul>
|
||
<h4><a class="anchor" name="5-2-hate-violence-harassment" href="#5-2-hate-violence-harassment"><i class="anchor-icon"></i></a>5.2. Hate, violence, harassment</h4>
|
||
<p>Ads must not promote hatred, intolerance, harassment, discrimination, violence, or abuse.</p>
|
||
<p><strong>Examples:</strong></p>
|
||
<ul>
|
||
<li>Violence and its promotion, <em>including supporting organizations or movements with ties to violence</em></li>
|
||
<li>Promoting harassment or bullying, <em>including dehumanizing speech, statements of inferiority, defamatory content, disclosing contact details or personal data</em></li>
|
||
<li>Discrimination towards individuals, groups, or organizations, <em>including hateful messages on the basis of race, religion, color, national or ethnic origin, age, beliefs, sexual orientation or practices, physical or mental abilities</em></li>
|
||
</ul>
|
||
<h4><a class="anchor" name="5-3-third-party-rights" href="#5-3-third-party-rights"><i class="anchor-icon"></i></a>5.3. Third party rights</h4>
|
||
<p>Ads and promoted content must not violate third party rights, including trademark, copyright, privacy or other personal or proprietary rights.</p>
|
||
<p><strong>Examples:</strong></p>
|
||
<ul>
|
||
<li>Unauthorized distribution of copyrighted content, <em>including pirated software and content such as movies, music, or books</em></li>
|
||
<li>Plagiarism, <em>including impersonating public figures or brands, misusing brand logos or assets, e.g., the Telegram logo</em></li>
|
||
</ul>
|
||
<h4><a class="anchor" name="5-4-deceptive-misleading-or-predatory-advertising" href="#5-4-deceptive-misleading-or-predatory-advertising"><i class="anchor-icon"></i></a>5.4. Deceptive, misleading, or predatory advertising</h4>
|
||
<p>Ads must not contain information that is false, misleading or simply does not match the product. This includes false statements, claims or offers, together with predatory advertising practices. </p>
|
||
<p><strong>Examples:</strong></p>
|
||
<ul>
|
||
<li>Clickbait or similar unrealistic statements, <em>including you-just-won-X claims, shock or scare tactics</em></li>
|
||
<li>Exaggerated comparisons and absolute claims, <em>including unsupported use of comparatives and superlatives: “highest incomes”, “best company”, and comparing your brand to a different one</em></li>
|
||
<li>Highlighting personal characteristics (e.g., ethnicity, religion, location, financial status), <em>including asking personal questions: “Do you like channels about finance?”, “Looking to pay off high debt?”</em></li>
|
||
<li>Implying negative outcomes for the viewer: <em>“Check out our channel so you don't get scammed”</em></li>
|
||
<li>Capitalizing on tragedies, health crises or acts of mass violence</li>
|
||
</ul>
|
||
<h4><a class="anchor" name="5-5-elections-political-ads-religion" href="#5-5-elections-political-ads-religion"><i class="anchor-icon"></i></a>5.5. Elections, political ads, religion</h4>
|
||
<p>Ads must not promote political campaigns, elections, political parties, candidates, political or religious movements.</p>
|
||
<p><strong>Examples:</strong></p>
|
||
<ul>
|
||
<li>Advocating for or against a politician, political party, or political movement</li>
|
||
<li>Exploiting political controversy, <em>including encouraging political unrest, disrupting public order</em></li>
|
||
<li>Advocating for or against religious beliefs, <em>including promotion of religious practices, rituals</em></li>
|
||
</ul>
|
||
<h4><a class="anchor" name="5-6-gambling" href="#5-6-gambling"><i class="anchor-icon"></i></a>5.6. Gambling</h4>
|
||
<p>Ads must not promote online or offline gambling, gaming, or casino-based activities involving real money, prizes, or goods of any value.</p>
|
||
<p><strong>Examples:</strong></p>
|
||
<ul>
|
||
<li>Games of chance or casinos, <em>including sports betting, lotteries, bingo, fantasy sports</em></li>
|
||
<li>Tips, odds, forecasts, <em>including sports picks, odds calculators</em></li>
|
||
</ul>
|
||
<h4><a class="anchor" name="5-7-deceptive-or-harmful-financial-products-or-services" href="#5-7-deceptive-or-harmful-financial-products-or-services"><i class="anchor-icon"></i></a>5.7. Deceptive or harmful financial products or services</h4>
|
||
<p>Ads must not promote content, products, or services associated with deceptive or harmful financial practices. When ads or destinations promote a paid product, the terms of purchase must be explicit and easy to understand.</p>
|
||
<p><strong>Examples:</strong></p>
|
||
<ul>
|
||
<li>Payday loans, cash loans, predatory lending, <em>including short-term loans</em></li>
|
||
<li>Get-rich-quick offers, pyramid schemes, multilevel marketing, <em>including offers of investment with guaranteed return, claims on providing insider tips on investments</em></li>
|
||
<li>Concealing or masking significant information about the promoted paid product, such as fees, terms, payment deadlines.</li>
|
||
</ul>
|
||
<h4><a class="anchor" name="5-8-uncertified-medical-services-medications-supplements" href="#5-8-uncertified-medical-services-medications-supplements"><i class="anchor-icon"></i></a>5.8. Uncertified medical services, medications, supplements</h4>
|
||
<p>Promoted products must comply with all local regulations and sellers must be properly licensed. Ads must not promote content, products or services implicitly or explicitly related to any unverified health and wellness benefits.</p>
|
||
<p><strong>Examples:</strong></p>
|
||
<ul>
|
||
<li>Nutrition products, including weight loss or gain products, herbal drugs, dietary supplements, pregnancy, and fertility-related products</li>
|
||
<li>Medicines not approved by the respective local regulatory body</li>
|
||
<li>Sale of medicines or medical products by a shop or entity that is not government-registered and authorized</li>
|
||
<li>Unlicensed medical devices, services and treatments</li>
|
||
<li>Prescriptions for medications</li>
|
||
<li>Products with unverified claims of healthful, curative or stimulating effects, <em>including methods suggesting unrealistic health improvements</em></li>
|
||
</ul>
|
||
<h4><a class="anchor" name="5-9-drugs-alcohol-tobacco" href="#5-9-drugs-alcohol-tobacco"><i class="anchor-icon"></i></a>5.9. Drugs, alcohol, tobacco</h4>
|
||
<p>Ads must not promote psychoactive substances, alcoholic beverages or tobacco products.</p>
|
||
<p><strong>Examples:</strong></p>
|
||
<ul>
|
||
<li>Alcoholic beverages, <em>including home brewing kits, non-alcoholic beer</em></li>
|
||
<li>Tobacco, <em>including e-cigarettes, rolling papers, chewing tobacco</em></li>
|
||
<li>Recreational drugs, <em>including equipment and paraphernalia, e.g., pipes, bongs</em></li>
|
||
<li>Instructions on producing drugs</li>
|
||
</ul>
|
||
<h4><a class="anchor" name="5-10-weapons-firearms-explosives-ammunition" href="#5-10-weapons-firearms-explosives-ammunition"><i class="anchor-icon"></i></a>5.10. Weapons, firearms, explosives, ammunition</h4>
|
||
<p>Ads must not promote the sale of weapons, explosives or ammunition, or any related content.</p>
|
||
<p><strong>Examples:</strong></p>
|
||
<ul>
|
||
<li>Firearms, <em>including sporting, recreational guns, or any antique functioning guns that can cause harm</em></li>
|
||
<li>Ammunition or accessories, <em>including any firearm parts or components, even unfinished, such as magazines, scopes, silencers</em></li>
|
||
<li>Knives and other melee weapons, <em>including pepper spray, daggers, axes</em></li>
|
||
<li>Explosives, <em>including bombs, grenades, fireworks, or firecrackers</em></li>
|
||
<li>Instructions on assembling or acquiring any product covered in this section</li>
|
||
</ul>
|
||
<h4><a class="anchor" name="5-11-spam-software-malware-hacking" href="#5-11-spam-software-malware-hacking"><i class="anchor-icon"></i></a>5.11. Spam software, malware, hacking</h4>
|
||
<p>Ads must not promote content, products, or services that facilitate unsolicited communications, are intended to harm or gain unauthorized access to a user's device, or cause deceptive or unexpected consequences.</p>
|
||
<p><strong>Examples:</strong></p>
|
||
<ul>
|
||
<li>Social media growth manipulation, <em>including encouraging growth of social media profiles</em></li>
|
||
<li>Incentivized or automated clicks, <em>including requests to perform actions on websites or services, complete online surveys</em></li>
|
||
<li>Services for generating automated traffic, <em>including services for inflating metrics/followers, sending automated content to social media platforms or other services</em></li>
|
||
<li>Phishing, <em>including promotion of services that trick a user into providing personal or other information</em></li>
|
||
<li>Software causing deceptive or unexpected consequences, <em>including modified apps containing malware, viruses, or any other malicious code</em></li>
|
||
</ul>
|
||
<h4><a class="anchor" name="5-12-products-of-questionable-legality" href="#5-12-products-of-questionable-legality"><i class="anchor-icon"></i></a>5.12. Products of questionable legality</h4>
|
||
<p>Ads must not promote content, products, or services of questionable legality.</p>
|
||
<p><strong>Examples:</strong></p>
|
||
<ul>
|
||
<li>Forgery, <em>including fake IDs, passports, visas, official documents</em></li>
|
||
<li>Human-trafficking, <em>including marriage brokering</em></li>
|
||
<li>Stolen or leaked data, <em>including carding, passwords to subscription services</em></li>
|
||
<li>Sale of body parts, <em>including bodily fluids</em></li>
|
||
<li>Counterfeit products, <em>including fake or bootleg goods, inauthentic artwork or digital goods, counterfeit currency</em></li>
|
||
</ul>
|
||
<hr>
|
||
<p><strong>All examples on this page are non-exhaustive.</strong></p>
|
||
</div>
|
||
|
||
</div></section>
|
||
</div><div class="popup-container login-popup-container hide" id="login-popup-container">
|
||
<div class="popup">
|
||
<div class="popup-body">
|
||
<section>
|
||
<h2>Log In</h2>
|
||
<p>Log in here to manage your ads. Please enter your <b>phone number</b> in the <a target="_blank" rel="noopener" href="https://telegram.org/faq#login-and-sms">international format</a> and we will send a confirmation message to your account via Telegram.</p>
|
||
|
||
<form id="send-form" class="login-form">
|
||
<div class="form-group">
|
||
<input type="tel" class="form-control pr-form-control input-lg" id="phone-number" placeholder="+12223334455" autocomplete="off"/>
|
||
</div>
|
||
<div class="popup-buttons">
|
||
<a class="btn btn-link btn-lg login-cancel-btn">Cancel</a><button type="submit" class="btn btn-link btn-lg">Next</button>
|
||
</div>
|
||
</form>
|
||
|
||
<div id="login-form" class="hide">
|
||
<div class="form-group">
|
||
<span class="form-control pr-form-control input input-lg input-disabled"><strong id="phone-number-field"></strong> (<a class="login-back" href="/auth">Incorrect?</a>)</span>
|
||
<p class="help-block dots-animated">We've just sent you a message.<br/>Please confirm access via Telegram</p>
|
||
</div>
|
||
<div class="popup-buttons">
|
||
<a class="btn btn-link btn-lg login-cancel-btn">Cancel</a><a class="btn btn-link btn-lg login-back">Back</a>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</div>
|
||
</div></div>
|
||
<script src="//telegram.org/js/jquery.min.js?1"></script>
|
||
<script src="//telegram.org/js/bootstrap.min.js"></script>
|
||
<script src="//telegram.org/js/main-aj.js?68"></script>
|
||
<script src="/js/main.js?47"></script>
|
||
<script src="/js/widget-frame.js?62"></script>
|
||
<script src="/js/promote.js?71"></script>
|
||
<script src="/js/jquery-ui.min.js?1"></script>
|
||
<script src="/js/jquery-ex.js?16"></script>
|
||
<script src="/js/tchart.min.js?18"></script>
|
||
<script src="/js/health.js?18"></script>
|
||
<script src="/js/tgsticker.js?31"></script>
|
||
|
||
<script>ajInit({"version":964,"apiUrl":"\/api?hash=telegram-crawler","unauth":true});</script>
|
||
<script id="aj_script">l.add({"WEB_AB_WARNING_HEADER":"Turn off ad blocker","WEB_POPUP_CLOSE_BTN":"Close","WEB_AB_WARNING_TEXT":"You appear to be using an ad blocker that may prevent pages on the Telegram Ad Platform from working as expected.<br\/><br\/>Please turn off your ad blocker or add <a href=\"http:\/\/promote.telegram.org\/\">promote.telegram.org<\/a> as an exception to manage your promoted messages."});
|
||
window.initDevPageNav&&initDevPageNav();
|
||
window.enableInlineVideo&&$('video').each(function(){enableInlineVideo(this)});
|
||
Ads.init();
|
||
Aj.onLoad(function(state) {
|
||
function requestConfirmation(event) {
|
||
event && event.preventDefault();
|
||
var phone = $('#phone-number').val();
|
||
$.ajax({
|
||
type: 'POST',
|
||
url: '/auth/request',
|
||
data: {
|
||
phone: phone
|
||
},
|
||
success: function(result) {
|
||
$('#phone-number-field').text(phone);
|
||
$('#send-form').addClass('hide');
|
||
$('#login-form').removeClass('hide');
|
||
checkAuth(result.temp_session);
|
||
},
|
||
error: function(xhr) {
|
||
showAlert(xhr.responseText || 'Server error');
|
||
},
|
||
dataType: 'json'
|
||
});
|
||
return false;
|
||
}
|
||
function cancelConfirmation(event) {
|
||
event && event.preventDefault();
|
||
$('#phone-number-field').text('');
|
||
$('#send-form').removeClass('hide');
|
||
$('#login-form').addClass('hide');
|
||
$('#phone-number').focus();
|
||
clearTimeout(window.authTimeout);
|
||
return false;
|
||
}
|
||
function checkAuth(temp_session) {
|
||
clearTimeout(window.authTimeout);
|
||
window.authTimeout = setTimeout(function doCheckAuth() {
|
||
$.ajax({
|
||
type: 'POST',
|
||
url: '/auth/login',
|
||
data: {
|
||
temp_session: temp_session
|
||
},
|
||
success: function(result) {
|
||
if (result) {
|
||
location.reload();
|
||
} else {
|
||
checkAuth(temp_session);
|
||
}
|
||
},
|
||
error: function (xhr) {
|
||
showAlert(xhr.responseText || 'Server error');
|
||
},
|
||
dataType: 'json'
|
||
});
|
||
}, 700);
|
||
}
|
||
$('#login-popup-container').on('popup:open', function() {
|
||
$('#phone-number').focus();
|
||
});
|
||
$('#login-popup-container').on('popup:close', function() {
|
||
cancelConfirmation();
|
||
if (location.pathname == '/auth') {
|
||
window.history && history.replaceState(null, null, '/');
|
||
}
|
||
});
|
||
$('#login-popup-container #send-form').on('submit', requestConfirmation);
|
||
$('#login-popup-container .login-cancel-btn').on('click', function(e) {
|
||
e.preventDefault();
|
||
closePopup('#login-popup-container');
|
||
});
|
||
$('#login-popup-container .login-back').on('click', cancelConfirmation);
|
||
$('.login-link').on('click', function(e) {
|
||
e.stopImmediatePropagation();
|
||
e.preventDefault();
|
||
openPopup('#login-popup-container');
|
||
});
|
||
});
|
||
Aj.onUnload(function(state) {
|
||
$('#login-popup-container').off('popup:open');
|
||
$('#login-popup-container').off('popup:close');
|
||
$('#login-popup-container #send-form').off('submit');
|
||
$('#login-popup-container .login-cancel-btn').off('click');
|
||
$('#login-popup-container .login-back').off('click');
|
||
$('.login-link').off('click');
|
||
});
|
||
</script>
|
||
<script>Aj.pageLoaded();</script>
|
||
|
||
</body>
|
||
</html>
|
||
|