1
1
Bifurcation 0

yahoo works, probably as well as it will

Cette révision appartient à :
Anthony Lieuallen 2006-05-14 23:09:01 +00:00
Parent 70b0034be9
révision 23a0e2d6d6

Voir le fichier

@ -18,9 +18,9 @@ var resurrect={
mirrors:[ mirrors:[
{name:'CoralCDN', id:'coralcdn'}, {name:'CoralCDN', id:'coralcdn'},
{name:'Google Cache', id:'google'}, {name:'Google Cache', id:'google'},
{name:'Yahoo! Cache', id:'yahoo'},
{name:'MSN Cache', id:'msn'},
{name:'The Internet Archive', id:'archive'} {name:'The Internet Archive', id:'archive'}
{name:'MSN Cache', id:'msn'},
{name:'Yahoo! Cache', id:'yahoo'},
], ],
originalDoc:null, originalDoc:null,
@ -132,6 +132,24 @@ var resurrect={
break; break;
case 'archive': case 'archive':
gotoUrl='http://web.archive.org/web/*/'+rawUrl gotoUrl='http://web.archive.org/web/*/'+rawUrl
break;
case 'yahoo':
//opener.resurrect.yahooApi(encUrl);
var xhr=new XMLHttpRequest();
xhr.open('GET',
'http://api.search.yahoo.com/WebSearchService/V1/'+
'webSearch?appid=firefox-resurrect&query='+encUrl+'&results=1',
false
);
xhr.send(null);
try {
var c=xhr.responseXML.getElementsByTagName('Cache');
gotoUrl=c[0].firstChild.textContent;
} catch (e ) {
gotoUrl='http://search.yahoo.com/search?p='+encUrl;
}
break; break;
} }
if (gotoUrl) { if (gotoUrl) {