Jesse Andrews
Admin
|
The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)
|
|
|
ashuai
Scriptwright
|
var imgs = getElementsByXPath('//img', node);
if (imgs.length) {}
if not found any image, you will meet exception.
|
|
|
xiaolu
Scriptwright
|
I can not get it to work under my google reader. Would you pls add some more detailed user manual onto this? Thank you.
|
|
|
heartilly
Scriptwright
|
thank you very much ..
and ur script too...
|
|
|
fkoji
Script's Author
|
@shawnste
I found same problem, but I' ve not still resolve.
@heartilly
I think that you can use Firefox add-on "RefControll" for your problem.
http://addons.mozilla.org/firefox/addon/953
|
|
|
heartilly
Scriptwright
|
Thank considering my comment, version 0.70 just work great for my daily feeds.
lately i found another problem for loading images.
Some image which can only be loaded under same domain. How can we get rid of this problem? and even we r under google.com we r able to load 3rd party images?
|
|
|
shawnster
Scriptwright
|
i found that if the source include a youtube video, the video itself cannot be showed.
|
|
|
fkoji
Script's Author
|
version 0.70
convert image relative path to absolute path
Notice:
If you re-install this script, you should save your SITE_INFO to other file.
|
|
|
heartilly
Scriptwright
|
I am very satisfied after 10min trying for this script, somehow i found that some images which linked with relative path is not been display.
for an Exemple <img src="images/thumnails/12345.jpg" />
it's my problem ? or ... anybody facing the same problem too ?
|
|
|
MNakano
User
|
I've written a patch to load a whole entry when it's loaded (currently, when it's focused) in AUTO_FETCH mode so that you won't feel lag to load external contents.
+++++++++++++++++++++++++++++++++++++++++++++++++
-- google_reader_full_feed_.js 2008-06-30 20:28:53 +0100
+++ google_reader_full_feed_.user.js 2008-06-30 21:00:19 +0100
@@ -68,22 +68,30 @@
var AUTO_FETCH = true;
var FullFeed = {};
FullFeed.link = '';
+FullFeed.parentKey = '';
+FullFeed.loaded = 0;
+
FullFeed.getFocusedLink = function() {
return getStringByXPath('//div[@id="current-entry"]//a[@class="entry-title-link"]/@href');
}
-FullFeed.getCurrentEntry = function() {
- var link = this.getFocusedLink();
+
+FullFeed.getCurrentEntry = function(entry) {
+ if (!entry) {
+ entry = getFirstElementByXPath('//div[@id="current-entry"]');
+ }
+
+ var link = getStringByXPath('.//a[@class="entry-title-link"]/@href', entry);
this.link = link;
- var body = getFirstElementByXPath('//div[@id="current-entry"]//div[@class="entry-body"]');
+ var body = getFirstElementByXPath('.//div[@class="entry-body"]', entry);
if (!body) {
- body= getFirstElementByXPath('//div[@id="current-entry"]//div[@class="entry-body entry-body-empty"]');
+ body= getFirstElementByXPath('.//div[@class="entry-body entry-body-empty"]', entry);
}
var source = '';
if (location.href.match(/#stream\/user/)) {
- source = getStringByXPath('//div[@id="current-entry"]//a[@class="entry-source-title"]/@href');
+ source = getStringByXPath('.//a[@class="entry-source-title"]/@href', entry);
}
else if (location.href.match(/#search\//)) {
- source = getStringByXPath('//div[@id="current-entry"]//a[@class="entry-source-title"]/@href');
+ source = getStringByXPath('.//a[@class="entry-source-title"]/@href', entry);
}
else if (location.href.match(/#stream\/feed/)) {
source = getStringByXPath('//div[@id="chrome-stream-title"]//a/@href');
@@ -182,15 +190,26 @@
}
if (AUTO_FETCH) {
- var interval = window.setInterval(
- function() {
- var focusedLink = FullFeed.getFocusedLink();
- if (focusedLink != FullFeed.link) {
- FullFeed.getCurrentEntry();
- }
- },
- 500
+ function autofetch() {
+ var key = document.location.href;
+ if (FullFeed.parentKey != key) {
+ FullFeed.loaded = 0;
+ FullFeed.parentKey = key;
+ }
+
+ var entries = document.evaluate('//div[contains(concat(" ",normalize-space(@class)," "), " entry ")]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
+
+ for (var i = FullFeed.loaded ; i < entries.snapshotLength ; i++) {
+ FullFeed.getCurrentEntry(entries.snapshotItem(i));
+ }
+ FullFeed.loaded = entries.snapshotLength;
+
+ window.setTimeout(
+ autofetch,
+ 500
);
+ }
+ autofetch();
}
document.addEventListener(
+++++++++++++++++++++++++++++++++++++++++++++++++
thank you for the great script!
|
|
|
fkoji
Script's Author
|
Thank you for all, and now we released version 0.60.
- Resolved an issue with entry-body-empty
- Multi xpath node
# sorry, we haven't fix redirect link issue yet..
|
|
|
ftofficer
User
|
Cool script. Thank you fkoji.
But there are some issues for empty-content feeds such as wireshark-dev mail list (http://www.wireshark.org/lists/wireshark-dev.rss). I patched the script to make it work:
diff google_reader_full_feed_fixed.user.js google_reader_full_feed.user.js
93,101d77
< if (!body) {
< body = getFirstElementByXPath('//div[@id="current-entry"]//div[@class="entry-body entry-body-empty"]');
< if (!body) {
< return false;
< }
< else {
< body.setAttribute('class', 'entry-body');
< }
< }
|
|
|
JX Wong
User
|
The script is nice!
But it's just load the first node of dom, I think it better to load much node, like this:
xpath: ['//div[@class="entryBody"] | //div[@class="commentTitle"] | //div[@class="comment"]']
the change is simple:
var contents = getElementsByXPath(SITE_INFO[i].xpath, htmldoc);
if (contents == null) return;
while (body.firstChild) {
body.removeChild(body.firstChild);
}
for (var num = 0; num < contents.length; num++) {
var content = contents[num];
content = addTargetAttr(content);
body.appendChild(content);
}
|
|
|
wolfie_liu
User
|
It's a great script!
Except for that you have to click the item so that it can load, hope you can fix it so when you open reader, the items load automatically.
Besides, if the link of the item in the reader get redirected after clicking, it won't work(http://www.cnbeta.com), hope you can fix that too.
ありがとう~!
|
|
|
fkoji
Script's Author
|
ver 0.50
Now, we can get contents automatically, without pressing z key.
|
|
|
fkoji
Script's Author
|
ver 0.43
Now, we use orverrideMimeType.
|
|
|
Ivan Markovic
User
|
Thank you very much, your script makes life so much easier ;)
|
|
|
fkoji
Script's Author
|
If you update this script, you should backup SITE_INFO.
|
|
|
fkoji
Script's Author
|
document.addEventListener(
- 'keypress',
+ 'keydown',
function(event) {
- var key = String.fromCharCode(event.charCode);
+ var key = String.fromCharCode(event.keyCode);
- if (key == 'z') {
+ if (key.toLowerCase() == 'z') {
FullFeed.getCurrentEntry();
}
},
false
);
|
|
|
fkoji
Script's Author
|
Now, we fix the problem.
Version 0.42 is working.
|
|
|
fkoji
Script's Author
|
Thank you for your comment. I also have a same trouble...
|
|
|
Ivan Markovic
User
|
I'm using this script for months and used to be very satisfied with it. But few days ago it just stop working. Is it some change to Google Reader that request for script change? Am I the only one with this behaviour?
|