2022-02-24 19:51:11 +01:00
<!DOCTYPE html>
< html >
< head >
< meta charset = "utf-8" >
< title > Templates - 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" >
2022-03-18 20:48:38 +01:00
< link href = "/css/telegram.css?224" rel = "stylesheet" >
2022-02-24 19:51:11 +01:00
< link href = "/css/instantview.css?115" 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 > < li class = "active" > Templates< / li > < / ol >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / header >
< main class = "rules 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 > < a href = "/" > Intro< / a > < / li > < li class = "active" > < a href = "/templates" > Templates< / a > < div id = "dev_side_nav_cont" > < / div > < / 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" >
< section >
< h3 > Templates< / h3 >
< p class = "about-text" > Enter any article URL to check the currently active Instant View template for issues – or create a new template if Instant View is not yet supported for the website.< / p >
< / section >
< div class = "list-group-contest" >
< div class = "list-group-contest-header" >
< div class = "contest-item-domain" > < span class = "cell-sort sort-active sort-asc" data-sort-by = "domain" > Domain< span class = "sort-marker" > < / span > < / span >
< / div >
< div class = "contest-item-info has-candidate has-info" >
< span class = "contest-item-cell contest-item-templates" > Template< / span > <!--
-->< span class = "contest-item-cell templates-item-date" > < span class = "cell-sort" data-sort-by = "date" > Last Update< span class = "sort-marker" > < / span > < / span > < / span >
< / div >
< / div >
< div class = "domain-filter-wrap templates-filter-wrap" >
< form class = "templates-filter-form" novalidate >
< input class = "form-control templates-filter-input input-lg" type = "url" name = "url" placeholder = "Enter domain name or link to any article..." autocomplete = "off" / >
< / form >
< / div >
< div class = "list-group-contest-rows templates-list" >
2022-03-24 12:19:10 +01:00
< div class = "list-group-contest-item-empty" > No active domains found< / div >
2022-02-24 19:51:11 +01:00
< / 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 = "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 iv-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 >
< script src = "/js/jquery.min.js?1" > < / script >
< script src = "/js/bootstrap.min.js" > < / script >
< script src = "/js/jquery-ex.js?11" > < / script >
< script src = "/js/instantview.js?72" > < / script >
< script > A p p = { " b a s e U r l " : " \ / a p i \ / t e m p l a t e s ? h a s h = t e l e g r a m - c r a w l e r " , " f r a m e O r i g i n " : " h t t p s : \ / \ / i v w e b c o n t e n t . t e l e g r a m . o r g " , " l a n g " : { " d e l e t e _ u r l _ c o n f i r m a t i o n " : " A r e y o u s u r e y o u w a n t t o s t o p t r a c k i n g t h i s U R L ? " , " d e l e t e _ u r l _ c o n f i r m _ b u t t o n " : " D e l e t e " , " n o t _ r e a d y _ f o r _ c o n t e s t _ a l e r t " : " S o r r y , t h i s t e m p l a t e c o v e r s t o o f e w a r t i c l e U R L s t h a t g e n e r a t e < b > v a l i d I n s t a n t V i e w p a g e s < \ / b > t o e n t e r t h e c o n t e s t . < b r \ / > < b r \ / > P l e a s e a d d a t l e a s t < b > 1 0 d i f f e r e n t U R L s < \ / b > f r o m t h i s w e b s i t e t o y o u r t e m p l a t e a n d p r e s s < b > T r a c k C h a n g e s < \ / b > o n e a c h o f t h e m t o m a k e s u r e t h e y a r e < a h r e f = \ " h t t p s : \ / \ / i n s t a n t v i e w . t e l e g r a m . o r g \ / c h e c k l i s t \ " > p r o c e s s e d c o r r e c t l y < \ / a > a n d g e n e r a t e v a l i d p a g e s . " , " s u b m i t _ f o r _ c o n t e s t _ c o n f i r m a t i o n " : " A r e y o u s u r e y o u w a n t t o s u b m i t t h i s t e m p l a t e f o r t h e c o n t e s t ? < b r \ / > < b r \ / > < b > N E W & # 3 3 ; < \ / b > C h e c k o u t t h e < a t a r g e t = \ " _ b l a n k \ " r e l = \ " n o o p e n e r \ " h r e f = \ " h t t p s : \ / \ / i n s t a n t v i e w . t e l e g r a m . o r g \ / c o n t e s t \ / \ / l i n k s \ " > l i s t o f p o t e n t i a l l y p r o b l e m a t i c l i n k s < \ / a > f o r < b > < \ / b > a n d m a k e s u r e t h a t y o u r t e m p l a t e s a t i s f i e s a l l t h e c r i t e r i a f o r a < a t a r g e t = \ " _ b l a n k \ " r e l = \ " n o o p e n e r \ " h r e f = \ " h t t p s : \ / \ / i n s t a n t v i e w . t e l e g r a m . o r g \ / c h e c k l i s t \ " > p e r f e c t t e m p l a t e < \ / a > . < b r \ / > < b r \ / > Y o u c a n r e s u b m i t a f i x e d v e r s i o n l a t e r , b u t i t w i l l l o s e i t s p l a c e a t t h e t o p o f t h e l i s t . A l l r e s u b m i s s i o n s w i l l b e c o n s i d e r e d n e w t e m p l a t e s f o r t h e p u r p o s e s o f d e t e r m i n i n g t h e w i n n e r . " , " s u b m i t _ f o r _ c o n t e s t _ c o n f i r m _ b u t t o n " : " C o n f i r m " , " s u b m i t _ t e m p l a t e _ c o n f i r m a t i o n " : " A r e y o u s u r e y o u w a n t t o s u b m i t t h i s t e m p l a t e ? < b r \ / > M a k e s u r e t h a t y o u r t e m p l a t e s a t i s f i e s a l l t h e c r i t e r i a f o r a < a t a r g e t = \ " _ b l a n k \ " r e l = \ " n o o p e n e r \ " h r e f = \ " h t t p s : \ / \ / i n s t a n t v i e w . t e l e g r a m . o r g \ / c h e c k l i s t \ " > p e r f e c t t e m p l a t e < \ / a > . < b r \ / > < b r \ / > N o t e t h a t i t w i l l < b > n o t < \ / b > p a r t i c i p a t e i n c o n t e s t . " , " s u b m i t _ t e m p l a t e _ c o n f i r m _ b u t t o n " : " C o n f i r m " , " r e v o k e _ f r o m _ c o n t e s t _ c o n f i r m a t i o n " : " A r e y o u s u r e y o u w a n t t o r e v o k e t h i s t e m p l a t e f r o m t h e c o n t e s t ? Y o u c a n r e s u b m i t a n e w v e r s i o n l a t e r , b u t y o u r t e m p l a t e w i l l l o s e i t s p l a c e a t t h e t o p o f t h e l i s t . " , " r e v o k e _ f r o m _ c o n t e s t _ c o n f i r m _ b u t t o n " : " R e v o k e " , " r e v o k e _ t e m p l a t e _ c o n f i r m a t i o n " : " A r e y o u s u r e y o u w a n t t o r e v o k e t h i s t e m p l a t e ? < b r \ / > < b r \ / > N o t e t h a t i t d o e s < b > n o t < \ / b > p a r t i c i p a t e i n c o n t e s t . " , " r e v o k e _ t e m p l a t e _ c o n f i r m _ b u t t o n " : " R e v o k e " , " r e s u b m i t _ f o r _ c o n t e s t _ c o n f i r m a t i o n " : " A r e y o u s u r e y o u w a n t t o r e s u b m i t t h i s t e m p l a t e f o r t h e c o n t e s t ? Y o u r p r e v i o u s t e m p l a t e w i l l l o s e i t s p l a c e a t t h e t o p o f t h e l i s t . < b r \ / > < b r \ / > < b > N E W & # 3 3 ; < \ / b > C h e c k o u t t h e < a t a r g e t = \ " _ b l a n k \ " r e l = \ " n o o p e n e r \ " h r e f = \ " h t t p s : \ / \ / i n s t a n t v i e w . t e l e g r a m . o r g \ / c o n t e s t \ / \ / l i n k s \ " > l i s t o f p o t e n t i a l l y p r o b l e m a t i c l i n k s < \ / a > f o r < b > < \ / b > a n d m a k e s u r e t h a t y o u r n e w v e r s i o n s a t i s f i e s a l l t h e c r i t e r i a f o r a < a t a r g e t = \ " _ b l a n k \ " r e l = \ " n o o p e n e r \ " h r e f = \ " h t t p s : \ / \ / i n s t a n t v i e w . t e l e g r a m . o r g \ / c h e c k l i s t \ " > p e r f e c t t e m p l a t e < \ / a > . " , " r e s u b m i t _ f o r _ c o n t e s t _ c o n f i r m _ b u t t o n " : " C o n f i r m " , " r e s u b m i t _ t e m p l a t e _ c o n f i r m a t i o n " : " A r e y o u s u r e y o u w a n t t o r e s u b m i t t h i s t e m p l a t e ? < b r \ / > M a k e s u r e t h a t y o u r t e m p l a t e s a t i s f i e s a l l t h e c r i t e r i a f o r a < a t a r g e t = \ " _ b l a n k \ " r e l = \ " n o o p e n e r \ " h r e f = \ " h t t p s : \ / \ / i n s t a n t v i e w . t e l e g r a m . o r g \ / c h e c k l i s t \ " > p e r f e c t t e m p l a t e < \ / a > . < b r \ / > < b r \ / > N o t e t h a t i t w i l l < b > n o t < \ / b > p a r t i c i p a t e i n c o n t e s t . " , " r e s u b m i t _ t e m p l a t e _ c o n f i r m _ b u t t o n " : " C o n f i r m " } } ;
$(window).resize(updateNavBar);updateNavBar();
initTemplatesList({
2022-03-24 12:19:10 +01:00
init_items: {"items":[],"next_offset":false},
2022-02-24 19:51:11 +01:00
prepareItem: function(item) {}
}, {
itemClass: 'list-group-contest-item',
onEnter: function(query) {
if (query) {
location.href = '/templates/?url=' + encodeURIComponent(query);
}
},
renderItem: function(item, query) {
var section_name = item.domain;
var rules_num = item.num;
var template_str = "Template #{n}".replace('{n}', rules_num);
var date_str = ivFormatDate(item.date);
return '< div class = "contest-item-domain" > < a href = "/templates/' + section_name + '/" > ' + section_name + '< / a > < / div > < div class = "contest-item-info" > < span class = "contest-item-cell contest-item-templates" > < a href = "/templates/' + section_name + '/template' + rules_num + '" > ' + template_str + '< / a > < / span > < span class = "contest-item-cell templates-item-date" > ' + date_str + '< / span > < / div > ';
},
renderLoading: function() {
return '< div class = "list-group-contest-item-empty dots-animated" > Loading< / div > ';
},
renderNoItems: function(query) {
if (App.templatesListIsLoading) {
return '< div class = "list-group-contest-item-empty dots-animated" > Loading< / div > ';
}
return '< div class = "list-group-contest-item-empty" > No active domains found< / div > ';
},
appendToItems: function(query, result_count) {
if (App.templatesListIsLoading & & result_count > 0) {
return '< div class = "list-group-contest-item-empty dots-animated" > Loading< / div > ';
}
return '';
}
});
$('.domain-filter').keydown(function(e) {
var filter = $(this);
var group = filter.parents('.list-group-contest');
setTimeout(function() {
var value = filter.val().toLowerCase();
var matches = value.match(/^(https?:\/\/)?(.*?)(\/|$)/i);
if (matches & & matches[2]) {
value = matches[2];
}
var count = 0;
$('.list-group-contest-item', group).map(function() {
var el = $(this);
var domain = el.attr('data-domain').toLowerCase();
var filtered = !value || (domain.indexOf(value) >= 0);
el.toggleClass('hide', !filtered);
if (filtered) count++;
});
$('.list-group-contest-item-empty', group).toggleClass('hide', !!count);
}, 10);
});
$('.domain-order').click(function(e) {
e.preventDefault();
var btn = $(this);
var group = btn.parents('.list-group-contest');
group.toggleClass('order-desc');
});
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 = $('#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) {
showLoginError(xhr.responseText || 'Server error');
},
dataType: 'json'
});
return false;
}
function cancelConfirmation(event) {
event & & event.preventDefault();
$('#login-alert').hide();
$('#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) {
showLoginError(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, '/');
}
});
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 >