/
reklama.html
136 lines (132 loc) · 6.23 KB
/
reklama.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Рекламная пауза, Подборка контекстной рекламы"/>
<meta name="keywords" content="Реклама, контекст, рся"/>
<meta name="author" content="Grigoriy Eremin, Григорий Еремин, egax@bk.ru">
<meta name="robots" content="all">
<meta name="yandex-verification" content="bf07f0af8e739c66">
<meta name="google-site-verification" content="eWwGSnvveM7GniusD-nYN2KXBDPtXBHmhKRezn_TBg8">
<title>Контекст / Сайт egax</title>
<link rel="icon" href="/icon.svg" type="image/svg+xml">
<link rel="stylesheet" href="/static/css/main.css">
<link rel="stylesheet" href="/static/css/vesti.css">
<script src="/static/js/metrics.js" data-floor="1"></script>
<script src="/static/js/updater.js"></script>
<script src="/static/js/template.js"></script>
</head>
<body>
<div id="root" class="main">
<div id="header" class="main scroll">
<a title="Записки и сообщения" href="/"><img src="/static/img/vesti_b.svg" onload="this.scrollIntoView()" alt="Записки"></a>
<a title="Заметки и посты" href="/posts.html"><img src="/static/img/posts.svg" alt="Заметки"></a>
<a title="Фотки и картинки" href="/foto.html"><img src="/static/img/fotki.svg" alt="Фотки"></a>
<a title="Аккорды, песни, стихи" href="/songs.html"><img src="/static/img/songs.svg" alt="Аккорды"></a>
<a title="Книги для чтения" href="/books.html"><img src="/static/img/books.svg" alt="Книги"></a>
<a title="Мои карты" href="/dbcartajs"><img src="/static/img/dbcartajs.svg" alt="Карты"></a>
</div>
<div id="page_header" class="main"></div>
<div id="page_content" class="main"></div>
<div id="page_footer" class="main"></div>
<p class="tcenter smaller gray hspace">
<i>P.S.</i> Контент сгенерирован Рекламной службой Яндекса
</p>
<table id="footer" class="main"><tr>
<td align="right" width="25%"><a href="//metrika.yandex.ru/stat/?id=65044687&from=informer" target="_blank" rel="nofollow"><img src="//informer.yandex.ru/informer/65044687/3_1_FFFFFFFF_EFEFEFFF_0_pageviews" alt="Яндекс.Метрика" title="Яндекс.Метрика: данные за сегодня (просмотры)" class="ym-advanced-informer" data-cid="65044687" data-lang="ru" /></a></td>
<td align="center"><a title="Исходный код" href="//github.com/egaxegax/egaxegax.github.io">Source</a></td>
<td class="smaller" width="25%">2014-24</td></tr>
</table>
</div>
<script>
document.getElementById('page_header').innerHTML =
'<div class="large table">'+
'<div class="tcell vmid"><h1 id="vestiheader">'+'Подборка контекстной рекламы'+'</h1></div>'+
'<div class="tcell tright vmid" style="width:30%">'+'<select id="rtblist"></select>'+'</div>'+
'</div>';
function addPageContent(roots, subjects, msgs, page){
PAGE.lock = 1;
if(!msgs.length){
document.getElementById('page_content').innerHTML += addNotFound();
return 1;
}
page.bottom = (page.num)*page.per;
page.top = page.bottom+page.per;
page.titles = msgs.slice(page.bottom, page.top);
page.rtb = document.getElementById('rtblist').value.split('_');
document.getElementById('page_content').innerHTML = '';
for(var i=0; i<page.titles.length; i++){
if(window.addYaRTB_Block){
document.getElementById('page_content').innerHTML +=
'<div id="yandex_rtb_'+(i+page.bottom)+'_0" class="bmarg mw mh" style="overflow:auto">'+addLoader(i==0)+'</div>'+
'<div id="yandex_rtb_'+(i+page.bottom)+'_1" class="bmarg mw mh style="overflow:auto"></div>';
addYaRTB_Block((i+page.bottom)+'_0', false, YA_RTB[page.rtb[0]], page.rtb[0] == 'feed' ? page.rtb[0] : '');
addYaRTB_Block((i+page.bottom)+'_1', false, YA_RTB[page.rtb[1]], page.rtb[1] == 'feed' ? page.rtb[1] : '');
} else {
document.getElementById('page_content').innerHTML +=
'<div id="block'+(i+page.bottom)+'_0" class="wrap">'+
'<div class="msgtext">'+'<b><em>'+(i+page.bottom)+'_0</em></b></div>'+
'</div>'+
'<div id="block'+(i+page.bottom)+'_1" class="wrap">'+
'<div class="msgtext">'+'<b><em>'+(i+page.bottom)+'_1</em></b></div>'+
'</div>';
}
console.log('page.rtb',String(page.rtb));
}
if(page.titles.length){
document.getElementById('page_footer').innerHTML = addPaginator(msgs, page,
'<button onclick="this.disabled = addPageContent({}, {}, MSGS, PAGE)" class="rounded nopad bigger" title="Загрузить ещё">↺</button>');
}
page.num++;
setTimeout(function(){ PAGE.lock = (page.titles.length == 0); }, 500);
return page.titles.length == 0;
}
window.PAGE = {
per: 1, // blocks count
num: urlParams().page||0,// start num page
qrtb: '7_7'
};
window.MSGS = [];
for(var n=0; n<100; n++){
window.MSGS.push( n );
}
for(var i in window.YA_RTB){
for(var j in window.YA_RTB){
document.getElementById('rtblist').innerHTML +=
'<option value="'+(i+'_'+j)+'">'+(i+'_'+j)+'</option>';
}
}
//
var osel = '7_7';
for(var p in urlParams()){
var pp = p.split('/');
if(p == 'page' && urlParams().page){ // ?page
// skip paginate
document.title += ' - ' + urlParams().page;
}else if(p == 'ysclid' && urlParams().ysclid){ // ?ysclid
// skip ya.ru search
}else if(pp.length>0){ // ?subj
var opts = document.getElementById('rtblist').options;
for(var ii=0; ii<opts.length; ii++){
if(opts[ii].innerHTML == pp[0]) osel = opts[ii].value;
}
}
}
document.getElementById('rtblist').onchange = function(){
window.location = '/reklama.html?' + (this.options[this.selectedIndex].innerHTML);
};
document.getElementById('rtblist').value = osel;
document.getElementById('page_content').innerHTML = '';
if(!addPageContent({}, {}, MSGS, PAGE)){
// if(urlParams().rel){ // ?rel
window.setInterval(function(){
if(addPageContent({}, {}, MSGS, PAGE)){
PAGE.num = 0;
};
}, (Math.random()*30+20)*1000);
// }
}
</script>
</body>
</html>