PK
4
main.jsview.caption = strTitle;
// default/initial settings
var url_0 = "http://www.spacearium.com/google.xml";
var _minimized = false;
setInterval(OnTimeout, 1000 * 600); // check once every hour
//
// view_onminimize
//
function view_onminimize()
{
_minimized = true;
OnTimeout();
}
//
// view_onrestore
//
function view_onrestore()
{
_minimized = false;
view.caption = strTitle;
}
//
// view_onOpen
//
function view_onOpen()
{
url_0 = "http://www.spacearium.com/google.xml";
OnTimeout();
}
//
// view_onoptionchanged
//
function view_onoptionchanged()
{
switch( event.propertyName )
{
case "url_0":
OnTimeout();
break;
}
}
function GetUrls() {
return url_0;
}
function TrimString(str) {
str = str.replace( /^\s+/g, "" ); // strip leading whitespaces
return str.replace( /\s+$/g, "" ); // strip trailing whitespaces
}
function GetDomainName(url) {
var i;
if ((i = url.indexOf("//")) != -1)
url = url.substring(i + 2);
if ((i = url.indexOf("/")) != -1)
url = url.substring(0, i);
var firstDot = url.indexOf(".");
var secondDot = url.indexOf(".", firstDot + 1);
while ((i = url.indexOf(".", secondDot + 1)) != -1) {
firstDot = secondDot;
secondDot = i;
}
if (firstDot != -1 && secondDot != -1) {
return url.substring(firstDot + 1);
}
}
//---- A class to manage the requests and callbacks of an item
function WordItem(url) {
// send request to webserver for data
var source = GetDomainName(url);
var http = new XMLHttpRequest();
var page='';
var entry='';
var entry2='';
http.onreadystatechange = OnData;
http.open("GET", url, true);
http.send();
function OnData() {
if (http.readyState == 4) { // completed?
// parse the xml data received
var doc = new DOMDocument();
doc.loadXML(http.responseText);
// read the word title, description and link from the xml
var title, desc, thelink, thedate;
var elem = doc.getElementsByTagName("item");
if (elem != null && elem.length > 0) {
for(var k=0; k < elem.length; k++) {
for (var node = elem[k].firstChild; node != null; node = node.nextSibling) {
if (node.nodeName == "title")
title = node.firstChild.nodeValue;
// if (node.nodeName == "description")
// desc = node.firstChild.nodeValue;
if (node.nodeName == "link")
thelink = node.firstChild.nodeValue;
if (node.nodeName == "pubDate")
thedate = node.firstChild.nodeValue;
eval("entry=Story"+k);
entry.href=thelink;
entry.innerText=title;
eval("entry2=theDate"+k);
entry2.innerText=thedate;
entry2.align="right";
}
}
}
http = null; // free the http object
}
}
}
function OnDetailsView(item) {
var obj = new Object();
obj.title = item.heading.substring(0, (item.heading.indexOf(":")));
// other properties we can set in this object are 'cancel', 'details_control' and
// 'flags'.
return obj;
}
//
// OnTimeout
//
function OnTimeout()
{
// issue requests for all our URLs
//var urls = GetUrls();
//for (var i = 0; i < urls.length; i++) {
var thepage = new WordItem(url_0);
//TimeLabel.innerText=thepage.page;
//thepage = null;
//}
//TimeLabel.innerText=url_0;
setInterval(OnTimeout, 1000 * 600); // check once every hour
}
PK
4s?Ú 1033/strings.xmlSpaceflightNews.net Headlines
Copyright (c) 2006
This plugin from The Spacearum and SpaceflightNews.net will give you the 20 latest headlines from www.spacearium.com right in your Google sidebar
Latest Space News Headlines from Spaceflightnews.net and The SpaceariumSpaceflightNews.netPK
47 gadget.gmanifest5A93930F-5274-4c6c-A59F-1CC60A8B778B1.0.0.0The Spacearium / SpaceflightNews.netmatt@aresinstitute.orghttp://www.spacearium.comCopyright (c) 2006 ARES InstituteLatest Space News Headlines from Spaceflightnews.net and The SpaceariumSpaceflightNews.net&PLUGIN_DESCRIPTION;&PLUGIN_NAME;&ABOUT_TEXT;plugin_small.gifplugin_large.gif
PK
a3< :b b plugin_small.gifGIF89a ˒૫ ! , 'H༠(䁛IZ ;ܱs ;PK
p4 A GoogleGadget/1033/PK
24 A0 1033/PK
a3
uTI I S plugin_large.gifPK
ո4F"7 7 main.xmlPK
4
' main.jsPK
4s?Ú ) 1033/strings.xmlPK
47 * gadget.gmanifestPK
a3< :b b - plugin_small.gifPK .