- 1
- 2
- 3
- 4
SELECT ...
FROM ...
WHERE (CASE WHEN big_part = 1 AND blk_flag = 2 THEN -1 ELSE 0 END) <> -1
;
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−157
SELECT ...
FROM ...
WHERE (CASE WHEN big_part = 1 AND blk_flag = 2 THEN -1 ELSE 0 END) <> -1
;
+96
if movcamn[1] then begin
//
if movcams[ 2] then begin if Nmr= 2 then goto m1;
if movcams[ 3] then begin if Nmr= 3 then goto m1;
if movcams[ 4] then begin if Nmr= 4 then goto m1;
if movcams[ 5] then begin if Nmr= 5 then goto m1;
if movcams[ 6] then begin if Nmr= 6 then goto m1;
if movcams[ 7] then begin if Nmr= 7 then goto m1;
if movcams[ 8] then begin if Nmr= 8 then goto m1;
if movcams[ 9] then begin if Nmr= 9 then goto m1;
if movcams[10] then begin if Nmr=10 then goto m1;
if movcams[11] then begin if Nmr=11 then goto m1;
if movcams[12] then begin if Nmr=12 then goto m1;
if movcams[13] then begin if Nmr=13 then goto m1;
if movcams[14] then begin if Nmr=14 then goto m1;
if movcams[15] then begin if Nmr=15 then goto m1;
if movcams[16] then begin if Nmr=16 then goto m1;
if movcams[17] then begin if Nmr=17 then goto m1;
if movcams[18] then begin if Nmr=18 then goto m1;
if movcams[19] then begin if Nmr=19 then goto m1;
if movcams[20] then begin if Nmr=20 then goto m1;
m1: Summs1:=0; movcams[1]:=False; movcamn[1]:=False;
movcam[1,1]:=False; movcam[1,2]:=False; movcam[1,3]:=False; movcam[1,4]:=False;
Summs2:=0; movcams[2]:=False; movcamn[2]:=False;
movcam[2,1]:=False; movcam[2,2]:=False; movcam[2,3]:=False; movcam[2,4]:=False;
if Nmr=2 then goto m2; // <---
Summs3:=0; movcams[3]:=False; movcamn[3]:=False;
movcam[3,1]:=False; movcam[3,2]:=False; movcam[3,3]:=False; movcam[3,4]:=False;
if Nmr=3 then goto m2; // <---
Summs4:=0; movcams[4]:=False; movcamn[4]:=False;
movcam[4,1]:=False; movcam[4,2]:=False; movcam[4,3]:=False; movcam[4,4]:=False;
if Nmr=4 then goto m2; // <---
Summs5:=0; movcams[5]:=False; movcamn[5]:=False;
movcam[5,1]:=False; movcam[5,2]:=False; movcam[5,3]:=False; movcam[5,4]:=False;
if Nmr=5 then goto m2; // <---
Summs6:=0; movcams[6]:=False; movcamn[6]:=False;
movcam[6,1]:=False; movcam[6,2]:=False; movcam[6,3]:=False; movcam[6,4]:=False;
if Nmr=6 then goto m2; // <---
Summs7:=0; movcams[7]:=False; movcamn[7]:=False;
movcam[7,1]:=False; movcam[7,2]:=False; movcam[7,3]:=False; movcam[7,4]:=False;
if Nmr=7 then goto m2; // <---
Summs8:=0; movcams[8]:=False; movcamn[8]:=False;
movcam[8,1]:=False; movcam[8,2]:=False; movcam[8,3]:=False; movcam[8,4]:=False;
if Nmr=8 then goto m2; // <---
Summs9:=0; movcams[9]:=False; movcamn[9]:=False;
movcam[9,1]:=False; movcam[9,2]:=False; movcam[9,3]:=False; movcam[9,4]:=False;
if Nmr=9 then goto m2; // <---
//
Summs10:=0; movcams[10]:=False; movcamn[10]:=False;
movcam[10,1]:=False; movcam[10,2]:=False; movcam[10,3]:=False; movcam[10,4]:=False;
if Nmr=10 then goto m2; // <---
Summs11:=0; movcams[11]:=False; movcamn[11]:=False;
movcam[11,1]:=False; movcam[11,2]:=False; movcam[11,3]:=False; movcam[10,4]:=False;
if Nmr=11 then goto m2; // <---
Summs12:=0; movcams[12]:=False; movcamn[12]:=False;
movcam[12,1]:=False; movcam[12,2]:=False; movcam[12,3]:=False; movcam[10,4]:=False;
if Nmr=12 then goto m2; // <---
Summs13:=0; movcams[13]:=False; movcamn[13]:=False;
movcam[13,1]:=False; movcam[13,2]:=False; movcam[13,3]:=False; movcam[10,4]:=False;
if Nmr=13 then goto m2; // <---
Summs14:=0; movcams[14]:=False; movcamn[14]:=False;
movcam[14,1]:=False; movcam[14,2]:=False; movcam[14,3]:=False; movcam[10,4]:=False;
if Nmr=14 then goto m2; // <---
Summs15:=0; movcams[15]:=False; movcamn[15]:=False;
movcam[15,1]:=False; movcam[15,2]:=False; movcam[15,3]:=False; movcam[10,4]:=False;
if Nmr=15 then goto m2; // <---
Summs16:=0; movcams[16]:=False; movcamn[16]:=False;
movcam[16,1]:=False; movcam[16,2]:=False; movcam[16,3]:=False; movcam[10,4]:=False;
if Nmr=16 then goto m2; // <---
Summs17:=0; movcams[17]:=False; movcamn[17]:=False;
movcam[17,1]:=False; movcam[17,2]:=False; movcam[17,3]:=False; movcam[10,4]:=False;
if Nmr=17 then goto m2; // <---
Summs18:=0; movcams[18]:=False; movcamn[18]:=False;
movcam[18,1]:=False; movcam[18,2]:=False; movcam[18,3]:=False; movcam[10,4]:=False;
if Nmr=18 then goto m2; // <---
Summs19:=0; movcams[19]:=False; movcamn[19]:=False;
movcam[19,1]:=False; movcam[19,2]:=False; movcam[19,3]:=False; movcam[10,4]:=False;
m2:
end; end; end; end; end; end; end; end; end; end; // 20 штук
end; end; end; end; end; end; end; end; end; end;
Попалось в одном проекте, который приходилось расчищать.
Особенно позабавило заботливое "// 20 штук" в конце.
+154
<?php
session_start();
include("database.php");
include("filter.php");
$filter = new Filter();
isset($_GET['cat']) ? $id = $filter->Symbols($_GET['cat']) : exit("Вы зашли на страницу без параметра!");
if ( !isset($_POST['class']) && empty($_POST['class']) )
{
include('header.php');
echo '
<title>Title</title>
';
include('slider.php');
echo '
<div id="Content">
';
}
$query_amount = $mysqli->query("SELECT COUNT(id) FROM `page_film` WHERE `genre_film`='$id' ");
$amount_film = $query_amount->fetch_row();
$query = $mysqli->query("SELECT * FROM `page_film` WHERE `genre_film`='$id' ORDER BY `id` DESC ");
if ( $amount_film[0] > 0 )
while( $row = $query->fetch_array(MYSQLI_ASSOC) )
echo '
<div class="block-film">
<a class="block-link-image" href="../films/film.php?id='.$row['id'].'">
<img src="'.$row['poster'].'" />
</a>
<div class="block-film-text">
<p class="film-name">
<a href="../films/film.php?id='.$row['id'].'">'.$row['title'].'</a>
</p>
<p class="film-mini-name">
<a href="../films/film.php?id='.$row['id'].'">'.$row['desc'].'</a>
</p>
<p class="film-genre"><span>'.$row['genre'].'</span></p>
<p class="film-description">'.$row['description'].'</p>
</div>
</div>
';
if ( !isset($_POST['class']) && empty($_POST['class']) )
{
echo '
</div>
</body>
</html>
';
}
?>
+153
$db = new DB_Sql();
$db->connect();
$sql = "SELECT distinct(absnum) FROM articles";
$db->query($sql);
while ($db->next_record()){
$is_img_sql[] = $db->f('absnum');
}
$Open = opendir($_SERVER['DOCUMENT_ROOT'].'/img/forall/a/');
while(false !== ($gdir = readdir($Open))){
if($gdir != "." && $gdir != ".."){
$dir[] = $gdir;
}
}
closedir($Open);
foreach ($dir as $fdir){
if(is_dir($_SERVER['DOCUMENT_ROOT'].'/img/forall/a/'.$fdir.'/')){
$Open2 = opendir($_SERVER['DOCUMENT_ROOT'].'/img/forall/a/'.$fdir.'/');
while(false !== ($gdir2 = readdir($Open2))){
if($gdir2 != "." && $gdir2 != ".."){
$tmp = intval($fdir.ereg_replace("\..*","",$gdir2));
if(!in_array($tmp,$is_img_sql)){
$delfile = $_SERVER['DOCUMENT_ROOT'].'/img/forall/a/'.$fdir.'/'.$gdir2;
if (is_file($delfile)){
if (unlink($delfile)){
echo "Файл <b>".$delfile."</b> удален<br>";
}
}
}
}
}
closedir($Open2);
}
}
$Open = opendir($_SERVER['DOCUMENT_ROOT'].'/img/g/');
while(false !== ($gdirg = readdir($Open))){
if($gdirg != "." && $gdirg != ".."){
$dirg[] = $gdirg;
}
}
closedir($Open);
foreach ($dirg as $fdir){
$Open2 = opendir($_SERVER['DOCUMENT_ROOT'].'/img/g/'.$fdir.'/');
while(false !== ($gdir2 = readdir($Open2))){
if($gdir2 != "." && $gdir2 != ".."){
$tmp = intval($fdir.$gdir2.ereg_replace("\..*","",$gdir3));
if(!in_array($tmp,$is_img_sql)){
$delfile = $_SERVER['DOCUMENT_ROOT'].'/img/g/'.$fdir.'/'.$gdir2;
if (is_dir($delfile)){
$Opendel = opendir($delfile);
while(false !== ($gdirdel = readdir($Opendel))){
if($gdirdel != "." && $gdirdel != ".."){
$tpmdel = $delfile."/".$gdirdel;
if (is_file($tpmdel)){
unlink($tpmdel);
}
}
}
if (rmdir($delfile)){
echo "Директория <b>".$delfile."</b> удалена<br>";
}
}
}
}
}
closedir($Open2);
}
$sql = "SELECT distinct(absnum) FROM price";
$db->query($sql);
while ($db->next_record()){
$is_img_price[] = $db->f('absnum');
}
$Open = opendir($_SERVER['DOCUMENT_ROOT'].'/img/forall/p/');
while(false !== ($gdirp = readdir($Open))){
if($gdirp != "." && $gdirp != ".."){
$dirp[] = $gdirp;
}
}
closedir($Open);
foreach ($dirp as $fdir){
$Open2 = opendir($_SERVER['DOCUMENT_ROOT'].'/img/forall/p/'.$fdir.'/');
while(false !== ($gdir2 = readdir($Open2))){
if($gdir2 != "." && $gdir2 != ".."){
$tmp = intval($fdir.ereg_replace("\..*","",$gdir2));
if(!in_array($tmp,$is_img_price)){
$delfile = $_SERVER['DOCUMENT_ROOT'].'/img/forall/p/'.$fdir.'/'.$gdir2;
if (is_file($delfile)){
if (unlink($delfile)){
echo "Файл <b>".$delfile."</b> удален<br>";
}
}
}
}
}
+141
//у стены - нахождение клеток "у стены"
procedure useny(var vsten:bulArr);
var i,i2:integer;
function sh(x,y,n:integer):boolean; // n-номер сдвига n=[2..5]
begin
if vsten[x+sdx[n],y+sdy[n]] then sh:=true
else
if sten[x+sdx[n],y+sdy[n]] then sh:=false
else
if sten[i2+sdx[n-1],i+sdy[n-1]]or sten[i2+sdx[n+1],i+sdy[n+1]]
then sh:=sh(x+sdx[n],y+sdy[n],n)
else sh:=false;
if result then vsten[x,y]:=true;
end;
begin
for i:=0 to ny do
for i2:=0 to nx do
if not(sten[i2,i]) then
if (sten[i2+1,i] or sten[i2-1,i])and(sten[i2,i+1] or sten[i2,i-1]) then
begin
vsten[i2,i]:=true;
sh(i2,i,2);sh(i2,i,3);sh(i2,i,4);sh(i2,i,5);
end;
end;
Попытка написать решатель Сокобана (Какая-то неведомая функция)
Примечания или то, что я узнал у владельца
1 useny - судя по всему УСтЕНЫ
2 vsten - массив клеток Возле СТЕН
3 sten - сами стены
4 sh - скорее всего Шаг, но автор не уверен.
5 sdx и sdy - СДвиг по Х и СДвиг по Y
+142
"function"==typeof rep&&(i=rep.call(b,a,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i){return"null";}if(gap+=indent,g=[],"[object Array]"===Object.prototype.toString.apply(i)){for(f=i.length,c=0;f>c;c+=1){g[c]=str(c,i)||"null";}return e=0===g.length?"[]":gap?"[\n"+gap+g.join(",\n"+gap)+"\n"+h+"]":"["+g.join(",")+"]",gap=h,e;}if(rep&&"object"==typeof rep){for(f=rep.length,c=0;f>c;c+=1){"string"==typeof rep[c]&&(d=rep[c],e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));}}else{for(d in i){Object.prototype.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));}}return e=0===g.length?"{}":gap?"{\n"+gap+g.join(",\n"+gap)+"\n"+h+"}":"{"+g.join(",")+"}",gap=h,e;}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null;},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf();});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(a,b,c){var d;if(gap="",indent="","number"==typeof c){for(d=0;c>d;d+=1){indent+=" ";}}else{"string"==typeof c&&(indent=c);}if(rep=b,!b||"function"==typeof b||"object"==typeof b&&"number"==typeof b.length){return str("",{"":a});}throw new Error("JSON.stringify");}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&"object"==typeof e){for(c in e){Object.prototype.hasOwnProperty.call(e,c)&&(d=walk(e,c),void 0!==d?e[c]=d:delete e[c]);}}return reviver.call(a,b,e);}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;}throw new SyntaxError("JSON.parse");});}(),define("../vendor/json2",function(){}),define("../src/bootstrap",[],function(){var a=function(a,b){var c,d=b.split("."),e=a;c=d.length;for(var f=0;c>f;f++){"undefined"==typeof e[d[f]]&&(e[d[f]]={}),e=e[d[f]];}return e;};"undefined"==typeof BKTAG&&a(window,"BKTAG"),BKTAG.ns=a;var b={createFrame:function(a){var b=document.createElement("iframe");return b.setAttribute("name",a),b.setAttribute("id",a),b.setAttribute("title","bk"),b.style.border="0px",b.style.width="0px",b.style.height="0px","function"==typeof bk_frameLoad&&(b.onload=bk_frameLoad),b.src="javascript:void(0)",b;},checkFrame:function(a){var c="__bkframe";if("undefined"==typeof frames[c]||"undefined"==typeof document.getElementById(c)){var d=b.createFrame(c),e=document.getElementsByTagName("body")[0];e&&e.appendChild(d);}"function"==typeof a&&a();}};return b;}),define("../vendor/htmlparser",[],function(){var a=function(a){for(var b={},c=a.split(","),d=0;d<c.length;d++){b[c[d]]=!0;}return b;},b={leftTrim:function(a){return a.replace(/^\s+/,"");},startTag:/^<(\w+)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,endTag:/^<\/(\w+)[^>]*>/,attr:/(\w+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,empty:a("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed"),block:a("address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,NOSCRIPT,object,ol,p,pre,script,SCRIPT,table,tbody,td,tfoot,th,thead,tr,ul"),inline:a("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,SCRIPT,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"),closeSelf:a("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),fillAttrs:a("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),special:a("script,SCRIPT,style"),one:a("html,head,body,title"),structure:{link:"head",base:"head"},htmlParser:function(a,c){function d(a,d,f,g){if(b.block[d]){for(;i.last()&&b.inline[i.last()];){e("",i.last());}}if(b.closeSelf[d]&&i.last()==d&&e("",d),g=b.empty[d]||!!g,g||i.push(d),c.start){var h=[];f.replace(b.attr,function(a,c){var d=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:b.fillAttrs[c]?c:"";h.push({name:c,value:d,escaped:d.replace(/(^|[^\\])"/g,'$1\\"')});}),c.start&&c.start(d,h,g);}}function e(a,b){if(b){for(var d=i.length-1;d>=0&&i[d]!=b;d--){}}else{var d=0;}if(d>=0){for(var e=i.length-1;e>=d;e--){c.end&&c.end(i[e]);}i.length=d;}}var f,g,h,i=[],j=a;for(i.last=function(){return this[this.length-1];};a;){if(g=!0,a=b.leftTrim(a),i.last()&&b.special[i.last()]){var k=new RegExp("</"+i.last()+">","i"),f=a.search(k),l=a.substring(0,f);l.length>0&&(c.chars&&c.chars(l),a=a.replace(l,"")),a=a.replace(k,""),e("",i.last());}else{if(0==a.indexOf("<!--")?(f=a.indexOf("-->"),f>=0&&(c.comment&&c.comment(a.substring(4,f)),a=a.substring(f+3),g=!1)):0==a.indexOf("</")?(h=a.match(b.endTag),h&&(a=a.substring(h[0].length),h[0].replace(b.endTag,e),g=!1)):0==a.indexOf("<")&&(h=a.match(b.startTag),h&&(a=a.substring(h[0].length),h[0].replace(b.startTag,d),g=!1)),g){f=a.indexOf("<");var m=0>f?a:a.substring(0,f);a=0>f?"":a.substring(f),c.chars&&c.chars(m);}}if(a==j){throw"Parse Error: "+a;}j=a;}e();},htmlToDom:function(a,c){var d=[],e=c.documentElement||c.
...
+126
%% Evaluate function Func() for all subscribers to Key
public_message(SubscrPid, Message) ->
gen_server:cast(SubscrPid, {public_message, Message}).
К слову об актуальных комментариях.
+151
$proposal['categories'] = explode(',',db_get_field('
SELECT GROUP_CONCAT(pc.category_id)
FROM `?:proposal_categories` pc
INNER JOIN `?:proposal` p ON pc.`proposal_id` = p.`id`
INNER JOIN `?:proposal_category` pca ON pc.`category_id` = pca.`id`
WHERE pca.`status` = ?s AND pc.`proposal_id` = ?i
ORDER BY pca.position', 'A', $proposal['proposal_id']));
Нашел в собственном коде... вроде безобидно, но забавно.
+155
$s='';
$kfg=new Konfig('');
$kfg('self');
{
$kfg->k1='v1';
$s.=$kfg->k1."\n";
}
{
$kfg->k2->k='v2';
$s.=$kfg->k2->k."\n";
}
{
$kfg->{'k3.k'}='v3';
$s.=$kfg->k3->k."\n";
}
{
$kfg->k4='v4';
$kfg->k4->k='v4';
$s.=$kfg->k4."\n";
$s.=$kfg->k4->k."\n";
}
{
$s.=$kfg->strstr('ab','b');
}
$this->response->body('<pre>'.$s."\n".Debug::dump((string)$kfg)."\n".Debug::dump($kfg).'</pre>');
TDD in Action, Вот так я проверяю работоспособность волшебной во всех местах конфиги.
из личного сайта http://lure0xaos.url.ph/
+153
if (/mail\/\?r=mail\/message_list/gim.test(location.href)) {
var ihoho = $($('form')[1]).parent().clone(true);
var myNickName = $($('li.sep_bl:has("a[href*=\'/mysite/\']")').find("a")[0]).prop("title");
eval('var prrtrns = /<b style="color:navy;">' + myNickName + '<\\/b>/gim;');
$($('form')[1]).parent().remove();
$($('.blue_wrap_block')[0]).after(ihoho);
var xls = $($($('form')[1]).find("input[type*='submit']")[0]);
xls.prop('type', 'button');
xls[0].setAttribute('onclick', 'var temp_tT = this.parentNode.parentNode.texttT.value; var rrr = this.parentNode.parentNode.r.value;var sid = this.parentNode.parentNode.sid.value;var CK = this.parentNode.parentNode.CK.value;var texttT = this.parentNode.parentNode.texttT.value;var Link_id = this.parentNode.parentNode.Link_id.value;var user = this.parentNode.parentNode.user.value;$.ajax({type:"POST",url: "http://spaces.ru/mail/?",data: {r:rrr,user:user,CK:CK,sid:sid,Link_id: Link_id,texttT:texttT},success:function(){document.forms[1].texttT.value = "";}});');
xls[0].setAttribute('name', 'okletsgo');
xls[0].setAttribute('style', 'display:none');
$('#navi').before("<script></script>");
document.forms[1].setAttribute('onkeypress', 'function lovly(e) { if (e.keyCode == 87 && e.altKey) document.forms[1].texttT = temp_tT; if (e.keyCode == 13 && !e.shiftKey && !e.ctrlKey) document.forms[1].okletsgo.click(); } lovly(event)');
$('.t-bg3').each(function(i) {
$(this).html($(this).html().replace(/<b style="color:darkmagenta;">Я<\/b>/gim, '<b style="color:navy;"><img src="http://spaces.ru/i//man_on.gif" alt="(ON)"/> <span style="text-decoration:underline">' + myNickName + '</span></b>').replace("<div class=\"overfl_hid service_links_block service_links_block_top clear\">", "<div style='display:none'>"));
}); //replace("<div class=\"left font0 avatar_wrap padd_right\">", '<div style="display:none">').
var reloadedMail = function(data) {
var dt = '';
$($(data).find("form")[1]).parent().each(function() {
dt = this.outerHTML;
});
data = data.replace(dt, "");
$(data).find('.t-bg3').each(function(i) {
if ($(this).html().replace(/Link_id=([0-9]+)/gim) != $($('.main').find('.t-bg3')[i]).html().replace(/Link_id=([0-9]+)/gim))
{
$($('.main').find('.t-bg3')[i]).html($(this).html().replace(/<b style="color:darkmagenta;">Я<\/b>/gim, '<b style="color:navy;"><img src="http://spaces.ru/i//man_on.gif" alt="(ON)"/> <span style="text-decoration:underline">' + myNickName + '</span></b>').replace("<div class=\"overfl_hid service_links_block service_links_block_top clear\">", "<div style='display:none'>"));
if ($(this).html().match(prrtrns) && settings.ajaxMailNotifications) {
$('#navi').before('<audio preload="auto" autoplay src="http://driverjs.webservis.ru/income.ogg"></audio>');
}
}
});
}
var reloadMail = function() {
$.ajax({
url: location.href,
success: reloadedMail
});
setTimeout(reloadMail, settings.ajaxTimeout);
}
reloadMail();
}
Что? Разработчики сайта не сделали отправку/принятие сообщений на AJAX?!
Поправим! Юзерскрипт порешает все.
//P.S. ЭТО КАК-ТО работает. Правда.