mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-11-29 03:33:09 +01:00
186 lines
6.7 KiB
HTML
186 lines
6.7 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<title>Instant View</title>
|
||
|
||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||
<link rel="alternate icon" href="/favicon.ico?4" type="image/x-icon" />
|
||
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
|
||
<link href="/css/bootstrap-extra.css?2" rel="stylesheet">
|
||
<link href="/css/telegram.css?212" rel="stylesheet">
|
||
<link href="/css/codemirror.css?1" rel="stylesheet">
|
||
<link href="/css/instantview.css?112" rel="stylesheet">
|
||
|
||
</head>
|
||
<body class="no-transition">
|
||
<header>
|
||
|
||
<div class="container">
|
||
<div class="row">
|
||
<div class="col-sm-12 col-lg-10 col-lg-offset-1">
|
||
<div class="header-wrap">
|
||
<div id="header-panel" class="header-panel">
|
||
<div class="header-breadcrumb header-breadcrumb-simple">
|
||
<ol id="breadcrumb" class="header-nav breadcrumb"><li class="iv-logo"><a href="/"><i class="iv-icon"></i><span class="iv-logo-title">Instant View</span></a></li></ol>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</header>
|
||
<main class="intro container">
|
||
<div class="row">
|
||
<div class="col-sm-3 col-sm-push-9 col-lg-offset-1 col-lg-3 col-lg-push-7">
|
||
<section class="nav-menu">
|
||
<ul class="nav nav-pills nav-stacked"><li class="active"><a href="/">Intro</a><div id="dev_side_nav_cont"></div></li><li><a href="/templates">Templates</a></li><li><a href="/checklist">Checklist</a></li><li><a href="/contest/winners2017">2017 Contest Winners</a></li><li><a href="/contest/winners2019">2019 Contest Winners</a></li><li class="divider"></li><li><a href="/samples/">Sample Templates</a></li><li><a href="/my/" data-need-auth>My Templates</a></li><li><a href="/docs">Manual</a></li></ul>
|
||
<div class="nav-footer">
|
||
<a class="logged-link" href="/auth" data-need-auth>Login</a>
|
||
<span class="logged">
|
||
<span class="logged-label">Hello, anonymous!</span>
|
||
</span>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
<div class="col-sm-9 col-sm-pull-3 col-lg-7 col-lg-pull-3">
|
||
<div class="content">
|
||
<div id="dev_page_content_wrap" class=" ">
|
||
<div class="dev_page_bread_crumbs"></div>
|
||
<h1 id="dev_page_title">Instant Views Explained</h1>
|
||
|
||
<div id="dev_page_content"></div>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</main><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 create Instant View templates. 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>
|
||
|
||
<div id="login-alert"></div>
|
||
<form id="send-form" class="login-form" onsubmit="return requestConfirmation(event);">
|
||
<div class="form-group">
|
||
<input type="tel" class="form-control iv-form-control input-lg" id="login-phone" 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 iv-form-control input input-lg input-disabled"><strong id="login-phone-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>
|
||
|
||
<script src="/js/jquery.min.js?1"></script>
|
||
<script src="/js/bootstrap.min.js"></script>
|
||
<script src="/js/main.js?42"></script>
|
||
<script src="/js/codemirror/codemirror.js?1"></script>
|
||
<script src="/js/codemirror/simple.js?1"></script>
|
||
<script src="/js/codemirror/runmode.js?1"></script>
|
||
<script src="/js/codemirror-instantview.js?21"></script>
|
||
<script src="/js/instantview.js?71"></script>
|
||
|
||
<script>openPopup('#login-popup-container');
|
||
window.initDevPageNav&&initDevPageNav();
|
||
$(window).resize(updateNavBar);updateNavBar();
|
||
$("pre").addClass("cm-s-default").each(function(){CodeMirror.runMode($(this).text(),"instantview",this);});
|
||
function showLoginError(error_text) {
|
||
$('#login-alert').html('<div class="alert alert-danger"> <a class="close" data-dismiss="alert" href="#">×</a>' + error_text + ' </div>').show();
|
||
}
|
||
function requestConfirmation(event) {
|
||
event.preventDefault();
|
||
$('#login-alert').hide();
|
||
var phone = $('#login-phone').val();
|
||
|
||
$.ajax({
|
||
type: 'POST',
|
||
url: '/auth/request',
|
||
data: {
|
||
phone: phone
|
||
},
|
||
success: function(result) {
|
||
$('#login-phone-field').text(phone);
|
||
$('#send-form').addClass('hide');
|
||
$('#login-form').removeClass('hide');
|
||
checkAuth(result.temp_session);
|
||
},
|
||
error: function(xhr) {
|
||
showLoginError(xhr.responseText || 'Server error');
|
||
},
|
||
dataType: 'json'
|
||
});
|
||
return false;
|
||
}
|
||
function cancelConfirmation(event) {
|
||
event && event.preventDefault();
|
||
$('#login-alert').hide();
|
||
$('#login-phone-field').text('');
|
||
$('#send-form').removeClass('hide');
|
||
$('#login-form').addClass('hide');
|
||
$('#login-phone').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) {
|
||
showLoginError(xhr.responseText || 'Server error');
|
||
},
|
||
dataType: 'json'
|
||
});
|
||
}, 700);
|
||
}
|
||
$('#login-popup-container').on('popup:open', function() {
|
||
$('#login-phone').focus();
|
||
});
|
||
$('#login-popup-container').on('popup:close', function() {
|
||
cancelConfirmation();
|
||
if (location.pathname == '/auth') {
|
||
window.history && history.replaceState(null, null, '/');
|
||
}
|
||
});
|
||
App.unauth = true;
|
||
$('a[data-need-auth]').click(function(e) {
|
||
e.preventDefault();
|
||
openPopup('#login-popup-container');
|
||
});
|
||
$('#login-popup-container .login-cancel-btn').click(function(e) {
|
||
e.preventDefault();
|
||
closePopup('#login-popup-container');
|
||
});
|
||
$('.login-back').click(cancelConfirmation);
|
||
</script>
|
||
</body>
|
||
</html>
|
||
|