[Greasemonkey] FF 1.5RC1/GM 0.6.3 Issue with User Script
Randy H. Tjahjono
mysubscriptions at pobox.com
Thu Nov 10 09:06:32 EST 2005
--- Original Message ---
Testing with 0.6.3 on 1.5 RC1 using the following (really annoying)
script, I did not observe any truncation of the href values.
What page did you observe that on? Can you provide a script that
exhibits the behavior specifically? The one you provided is trying to
do something useful, but I think I'm missing the point.
links = document.evaluate("//a[@href]", document, null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = 0; i < links.snapshotLength; i++) {
a = links.snapshotItem(i);
href = a.href;
alert(href);
}
--- End Original Message ---
The script is being used on http://www.newschannel5.com/content/news/. I'm trying to re-write the links to the news stories on the page so that it appends the querystring '?print=true'. However, the script below(for me anyway) does not return the filename. The website is running on IIS (the pages are ASP).
links = document.evaluate("//a[@href]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = 0; i < links.snapshotLength; i++) {
a = links.snapshotItem(i);
href = a.href
if (href.match(/newschannel5\.com\/content\/news\//i)) {
href += '?print=true';
}
}
I hope that is more clear.
Thank you
Randy T.
More information about the Greasemonkey
mailing list