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 >
Text File  |  2008-06-27  |  912b  |  46 lines

  1. var maxFeedView={};
  2. $langDefaultSection="FeedView";
  3. maxFeedView.rebuildContent=function(_1){
  4. _1++;
  5. for(var i=1;i<_1;i++){
  6. maxFeedView.rewriteTitle(i);
  7. maxFeedView.rewriteContent(i);
  8. }
  9. };
  10. maxFeedView.rewriteTitle=function(_3){
  11. var _4=$id("nav_"+_3);
  12. if(!_4){
  13. return;
  14. }
  15. var _5=$decodeHTMLEntities(_4.innerText);
  16. _4.innerText=_5.$cut(35);
  17. var _4=$id("title_"+_3);
  18. if(_4){
  19. _4.innerText=_5;
  20. }
  21. };
  22. maxFeedView.rewriteContent=function(_6){
  23. var _7=$id("content_data_"+_6);
  24. if(!_7){
  25. return;
  26. }
  27. var _8=_7.innerText.$trim();
  28. _7.innerHTML="";
  29. if(_8==""){
  30. return;
  31. }
  32. if(_8.search(/(\<br|\<\/div>|\<\/span>|\<\/p>|\<\/a>|\<\/font>|\<\/b>|\<\/strong>)/ig)>0){
  33. _8=_8.$sanitizeHTML();
  34. }else{
  35. _8=_8.$encodeHTML();
  36. }
  37. $write(_8,"content_"+_6);
  38. };
  39. maxFeedView.addFeed=function(){
  40. external.max_addRSS(document.location.href);
  41. };
  42. maxFeedView.writeLang=function(_9){
  43. $write($lang(_9).replace(/\\n/g,"<br/>").replace(/\"/g,"""));
  44. };
  45.  
  46.