Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* быдлокод начало */
- function update_a_info(url) {
- $.ajax({
- url: url,
- dataType: 'json',
- success: function(data) { $("#a_urls").text('ссылок у нас: '+data.urls); $("#a_unic").text('уникальное кл.просмотров: '+data.unic); },
- error: function() { $("#a_urls").text('ссылок у нас: ERROR'); $("#a_unic").text('уникальное кл.просмотров: ERROR'); }
- });
- return true;
- }
- function dlg_bad_post() {
- var check = ($('#god_this_not_love_dlg .check').hasClass('ok')) ? true : false;
- var elems = {label: Array(), obj: Array()}
- $('#god_this_not_love_dlg input').each(function(index, elem){elems.obj.push(elem)});
- elems.obj.push($('#god_this_not_love_dlg textarea'));
- $('#god_this_not_love_dlg label').each(function(index, elem){elems.label.push(elem)});
- if (check) {
- if($.trim($(elems.obj[0]).text()) == '') { alert('ПУСТОТА'); }
- } else {
- }
- return false;
- }
- function show_bad() {($('#god_this_not_love_dlg').css('display') != 'block') ? $('#god_this_not_love_dlg').show(200) : $('#god_this_not_love_dlg').hide(200);return false;}
- function dlg_bad_check() {
- var elem=$('#god_this_not_love_dlg .check');
- if (elem.hasClass('ok')){elem.removeClass('ok');$('#god_this_not_love_dlg .inothere').each(function(index, element){$(element).hide();});}
- else {elem.addClass('ok');$('#god_this_not_love_dlg .inothere').each(function(index, element){$(element).show();});}
- return false;
- }
- function loadin_page(url,gogo) {
- if (location.href == url && !gogo) {return false;}
- if (!window.history) {return true;}
- $('#page .line').html('<div id="ajax-load"><div class="load">загружаем</div></div>');
- $.ajax({type:'GET','url':url,cache:false,timeout:15000,
- error: function() {$('#page .line').html('<div style="margin-top: 35px; margin-bottom: -65px;" id="ajax-load">упс, произошла ошибка во время загрузки</div>')},
- success: function(data, status) {$('#page').hide(200).show(200);$('#page .line').html(data).attr('style',((/\.[a-z]{2,3}\/$/).test(url))?'padding: 8px':'');window.history.pushState( {html:data} , null, url);}
- });
- return false;
- }
- $(document).ready(function(){
- setTimeout(function() {$(window).bind('popstate', function (e) {
- e = e.originalEvent;
- if( e.state ) {$('#page .line').html(e.state.html);$('#page .line').attr('style',((/\.[a-z]{2,3}\/$/).test(location.href))?'padding: 8px':'');}
- else {if ( $('#echo-qr') ) return; else loadin_page(location.href);}
- })},10);
- });
- /* быдлокод конец */
Add Comment
Please, Sign In to add comment