Skip to content

Instantly share code, notes, and snippets.

@youpy
Created December 1, 2010 05:57
Show Gist options
  • Save youpy/723044 to your computer and use it in GitHub Desktop.
Save youpy/723044 to your computer and use it in GitHub Desktop.
diff --git a/xpi/chrome/content/library/20_model.js b/xpi/chrome/content/library/20_model.js
index 47921b0..0c13b43 100755
--- a/xpi/chrome/content/library/20_model.js
+++ b/xpi/chrome/content/library/20_model.js
@@ -1154,7 +1154,7 @@ models.register({
});
}).addCallback(function(res){
var doc = convertToHTMLDocument(res.responseText);
- if(!doc.getElementById('title'))
+ if(!doc.getElementById('saveTitle'))
throw new Error(getMessage('error.notLoggedin'));
function getTags(part){
@@ -1163,10 +1163,10 @@ models.register({
return {
editPage : 'http://www.delicious.com/save?url=' + url,
form : {
- item : doc.getElementById('title').value,
- description : doc.getElementById('notes').value,
- tags : doc.getElementById('tags').value.split(' '),
- private : doc.getElementById('share').checked,
+ item : doc.getElementById('saveTitle').value,
+ description : doc.getElementById('saveNotes').value,
+ tags : doc.getElementById('saveTags').value.split(' '),
+ private : doc.getElementById('savePrivate').checked,
},
duplicated : !!doc.getElementById('delete'),
@@ -1193,7 +1193,7 @@ models.register({
// FIXME: 判定不完全、_userが取得できて、かつ、ログアウトしている状態がありうる
if(decodeURIComponent(getCookieString('www.delicious.com', '_user')).match(/user=(.*?) /))
return RegExp.$1;
-
+
throw new Error(getMessage('error.notLoggedin'));
},
@@ -1209,11 +1209,11 @@ models.register({
},
}).addCallback(function(res){
var doc = convertToHTMLDocument(res.responseText);
- var elmForm = doc.getElementById('saveitem');
+ var elmForm = doc.getElementById('saveForm');
if(!elmForm)
throw new Error(getMessage('error.notLoggedin'));
- return request('http://www.delicious.com' + $x('id("saveitem")/@action', doc), {
+ return request('http://www.delicious.com' + $x('id("saveForm")/@action', doc), {
redirectionLimit : 0,
sendContent : update(formContents(elmForm), {
description : ps.item,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment