Changeset 14433
- Timestamp:
- 06/22/08 23:19:57 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/userscripts/ldr_show_sbm_comments/ldr_show_sbm_comments.user.js
r14336 r14433 22 22 var item_link = item.link; 23 23 var item_id = item.id; 24 var url = encodeURIComponent(item_link );24 var url = encodeURIComponent(item_link.replace(/%23/g, '#')); 25 25 var elem = w.$('sbm_' + item_id); 26 26 … … 29 29 parseResponse : function (req) { 30 30 var o = new Function('return ' + req.responseText)(); 31 if (!o || o.count < 1) return []; 32 return o.bookmarks.map(hatena.makeComment); 31 return (o && o.count > 0) ? o.bookmarks.map(hatena.makeComment) : []; 33 32 }, 34 33 makeTag : function (tags, id) { … … 63 62 parseResponse: function (req) { 64 63 var o = new Function('return ' + req.responseText)(); 65 if (!o.isSuccess) return []; 66 return o.Comments.map(livedoor.makeComment); 64 return (o.isSuccess) ? o.Comments.map(livedoor.makeComment) : []; 67 65 }, 68 66 makeTag : function (tags, id) {
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)