File size: 1.65Kb
var frmNum = 0
function document.body.onclick(){
var obj = event.srcElement;
if (obj.snap){
if (obj.innerText=='[їмХХФ¤АА]'){
var iName = 'Iframe'+(frmNum++);
obj.innerHTML = '[№Ш±ХїмХХ]<span onClick="noLight(\''+iName+'\')"> [Зеіэ№ШјьґКјУББ]</span><br><iframe src="cache.php?url='+escape(obj.snap)+'" width="100%" height="300" style="border:1px solid #000" name="'+iName+'" onload="Light(this.name)"></iframe>'
} else{
obj.innerText = '[їмХХФ¤АА]'
}
}
}
var KWD = document.forms[0].keywords.value;
KWD = KWD.replace(/[\$\(\)\*\+\.\[\?\\\^\{\|\/-<>"']/g,' ');//№эВЛМШКвЧЦ·ы
KWD = KWD.replace(/ ( *)/g, ' ');//ИҐіэ¶аїХёс
KWD = KWD.replace(/(^ * )?(.*)[ ]$/g,'$2');//ИҐіэБЅ¶ЛїХёс
KWD = KWD.split(' ');//ЧЄОЄКэЧй
function Light(Iframe){
var aKWD,bodyHTML,Ibody;
Iframe = eval(Iframe);
Ibody = Iframe.document.body
bodyHTML = Ibody.innerHTML;
aKWD = /([^>]*)([^<]*)([^>]*)/gim;//Йи¶Ё№эВЛ±кЗ©
for (var i in KWD){
bodyHTML = bodyHTML.replace
(aKWD,
function f2c($0,$1,$2,$3){
aKWD0 = eval('/'+KWD[i]+'/gim;');
return($1+$2.replace(aKWD0,'<b style="color: red; background-color: yellow" >'+KWD[i]+'</b>')+$3);
}
);
}
Ibody.innerHTML = bodyHTML;
Iframe.iDo = 'kc';
}
function noLight(Iframe){
var obj = event.srcElement;
Iframe = eval(Iframe);
if (Iframe.iDo!='kc' || Iframe.location.href.indexOf('?url=')<0){return;}
if (obj.iDo=='kc'){
obj.innerText = ' [Зеіэ№ШјьґКјУББ]';
obj.iDo = 'jn';
Light(Iframe);
return;
}
Ibody = Iframe.document.body
Ibody.innerHTML = Ibody.innerHTML.replace(/(<b[^>]*>)([^\/]*)(<\/b>)/gim,"$2");
obj.innerText = ' [µг»чјУББ№ШјьґК]';
obj.iDo = 'kc';
}