home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2005 March
/
PCWorld_2005-03_cd.bin
/
komunikace
/
kmeleon
/
kmeleon09.exe
/
aggreg8.jar
/
content
/
aggreg8.js
< prev
next >
Wrap
Text File
|
2004-11-30
|
3KB
|
121 lines
// namespaces, just in case
const XLinkNS = "http://www.w3.org/1999/xlink";
const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
const XMLNS = "http://www.w3.org/XML/1998/namespace";
const XHTMLNS = "http://www.w3.org/1999/xhtml";
const USER_AGENT = "Aggreg8 RSS aggregator";
const RESULT_OK = 0;
const RESULT_PARSE_ERROR = 1;
const RESULT_NOT_RSS = 2;
const RESULT_NOT_FOUND = 3;
const RESULT_NOT_AVAILABLE = 4;
const RESULT_ERROR_FAILURE = 5;
var resultStrArray = null;
// XUL Object
var strRes // stringbundle Object
var bookmarksTree;
var rssItemListBox;
var rssStatusDeck;
var rssStatusImage;
var rssStatusLabel;
var rssTitleLabel;
var rssItemListPopup;
var rssObject;
var httpReq;
var prefObserverRssReaderFolder;
var responseXML;
var lastResource;
var rssLoading = false;
var rssReaderFolderID = "";
var enableTooltip = true;
var popupTimeoutId=0;
function onLoad(){
//refreshDisplaytree();
return true;
}
function onLoadDisplay() {
//refreshDisplaytreefromframe();
return true;
}
function switchRSSFeedDisplay()
{
var exTree = document.getElementById( "rssfeed-tree" );
var selectedItem = exTree.contentView.getItemAtIndex(exTree.currentIndex);
aggreg8dump("Switching content in Main Window");
if(selectedItem.firstChild.firstChild.getAttribute("_type")=="feeds")
{
var newURL = selectedItem.firstChild.firstChild.getAttribute("url");
aggreg8dump("Found URL");
document.getElementById( "rss-feed-text-description" ).setAttribute( "src", "" );
aggreg8dump("Downloading Feed");
var progress_meter = document.getElementById( "progress-meter" );
aggreg8dump("progress meter found");
progress_meter.setAttribute( "value", "0%");
progress_meter.setAttribute( "mode", "undetermined");
aggreg8dump("observe_isloaded :" + newURL + " : start");
httpGet(newURL);
aggreg8dump("Loaded :" + newURL + " : start");
//must fix the progress meter
//delete all the contsants that are not needed
//observe_isloaded(newURL);
}//end if statement
else
{
}
}
function doAbout() {
window.open('chrome://aggreg8/content/about.xul','aboutaggreg8','chrome,resizable,width=700,height=550,screenX=50,screenY=50');
}
function refreshdisplay(frame) {
var ibrowser = document.getElementById(frame);
ibrowser.reloadWithFlags("LOAD_FLAGS_BYPASS_CACHE");
}
function showrss()
{
//document.getElementById( "rss-frame" ).setAttribute( "maxheight","100");
try{
var exTree = document.getElementById( "rssfeed-tree" );
var selectedItem = exTree.contentView.getItemAtIndex(exTree.currentIndex);
var newURL = selectedItem.firstChild.firstChild.getAttribute("url");
document.getElementById( "rss-feed-text-description" ).setAttribute( "src", newURL );
}catch(e)
{
aggreg8dump(e);
}
}