switching from faves.com to del.icio.us only with javascript

とは言っても一回ダウンロードして
<?access-control allow="*"?>
つけてる。https://api.del.icio.us/ を開いてfirebugで実行。

extendedの長さ制約がfavesはかなり緩いんだけどdelicious厳しい。データが欠けるので戻れなくなった。どうしよう....

var xhr = new XMLHttpRequest();
xhr.open("GET", "http://fav/all.xml", false);
xhr.send(null);
var raw = xhr.responseText.replace(/<\?.+?\?>/g, "");

var e4x = new XML(raw);
var l = e4x..post;
for ( var i = 0; i < l.length() ; i++ ) {
    var x = l[i];
	
	var q = [
		"url=" + encodeURIComponent( x.@href  ) ,
		"description=" + encodeURIComponent( x.@description  ),
		"extended=" + encodeURIComponent( x.@extended  ),
		"tags=" + encodeURIComponent( x.@tag  ) ,
		"dt=" + encodeURIComponent( x.@time  ) ,
		"shared=" + encodeURIComponent( x.@shared  ) 
	].join("&");

    var xhr = new XMLHttpRequest();
xhr.open("GET", "https://api.del.icio.us/v1/posts/add?" + q, false);
xhr.send(null);

console.log(x.@description, xhr)
    
}