Changeset 7135
- Timestamp:
- 02/25/08 20:30:26 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/userscripts/googlereaderfullfeed.user.js
r7133 r7135 8 8 // @description loading full entry on Google Reader 9 9 // @privilege false 10 // @version 0.0. 410 // @version 0.0.5 11 11 // based on LDR Full Feed(http://d.hatena.ne.jp/toshi123) 12 12 // … … 265 265 var feed = c.feed; 266 266 if (item.link.match(pattern) || feed.channel.link.match(pattern)) { 267 varicon = document.createElement('span');267 icon = document.createElement('span'); 268 268 icon.title = description; 269 269 icon.innerHTML = '<img src="'+ICON+'">' … … 298 298 w.get_active_item = function(flag) { 299 299 var item = {} 300 item.link = getFirstElementByXPath('id("current-entry")//a[contains(concat(" ",@class," "),"entry-title-link")]').href; 301 item.title = getFirstElementByXPath('id("current-entry")//a[contains(concat(" ",@class," "),"entry-title-link")]').textContent; 300 try { 301 item.link = getFirstElementByXPath('id("current-entry")//a[contains(concat(" ",@class," "),"entry-title-link")]').href; 302 item.title = getFirstElementByXPath('id("current-entry")//a[contains(concat(" ",@class," "),"entry-title-link")]').textContent; 303 } catch(e) {} 302 304 return item; 303 305 } … … 306 308 var feed = {}; 307 309 feed.channel = {} 308 feed.channel.link = decodeURIComponent(getFirstElementByXPath('id("current-entry")//a[contains(concat(" ",@class," "),"entry-source-title")]').href.replace(/^.*\/http/, 'http')); 310 try { 311 feed.channel.link = decodeURIComponent(getFirstElementByXPath('id("current-entry")//a[contains(concat(" ",@class," "),"entry-source-title")]').href.replace(/^.*\/http/, 'http')); 312 } catch(e) {} 309 313 return feed; 310 314 } … … 381 385 var init = function(){ 382 386 var c = new getCurrentItem(); 387 if (!c.title) return; 383 388 if(c.title.match(ADCHECKER)){ 384 389 message('This entry is advertisement'); … … 422 427 if (timer) clearTimeout(timer); 423 428 try { 424 var container = getFirstElementByXPath('id("current-entry")//span[contains(concat(" ",@class," "),"gm_fullfeed_checked")]'); 425 if (!container || !w.hasClass(container, 'gm_fullfeed_checked')) { 429 var container = getFirstElementByXPath('id("current-entry")//a[contains(concat(" ",@class," "),"entry-title-link")]'); 430 var icon = getFirstElementByXPath('id("current-entry")//span[contains(concat(" ",@class," "),"gm_fullfeed_checked")]'); 431 if (container && !icon) { 426 432 FullFeed.registerWidgets(); 427 433 }
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)