home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2008 September
/
PCWorld_2008-09_cd.bin
/
komunikace
/
maxthon
/
mx_2.1.2.649.exe
/
template
/
FeedView
/
feed.js
< prev
next >
Wrap
Text File
|
2008-06-27
|
912b
|
46 lines
var maxFeedView={};
$langDefaultSection="FeedView";
maxFeedView.rebuildContent=function(_1){
_1++;
for(var i=1;i<_1;i++){
maxFeedView.rewriteTitle(i);
maxFeedView.rewriteContent(i);
}
};
maxFeedView.rewriteTitle=function(_3){
var _4=$id("nav_"+_3);
if(!_4){
return;
}
var _5=$decodeHTMLEntities(_4.innerText);
_4.innerText=_5.$cut(35);
var _4=$id("title_"+_3);
if(_4){
_4.innerText=_5;
}
};
maxFeedView.rewriteContent=function(_6){
var _7=$id("content_data_"+_6);
if(!_7){
return;
}
var _8=_7.innerText.$trim();
_7.innerHTML="";
if(_8==""){
return;
}
if(_8.search(/(\<br|\<\/div>|\<\/span>|\<\/p>|\<\/a>|\<\/font>|\<\/b>|\<\/strong>)/ig)>0){
_8=_8.$sanitizeHTML();
}else{
_8=_8.$encodeHTML();
}
$write(_8,"content_"+_6);
};
maxFeedView.addFeed=function(){
external.max_addRSS(document.location.href);
};
maxFeedView.writeLang=function(_9){
$write($lang(_9).replace(/\\n/g,"<br/>").replace(/\"/g,"""));
};