Archived Comments (locked)
|
|
The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008) |
|
|
![]() http://www.imdb.com/title/tt0460649/ |
|
|
It doesn't seem to work, nothing happens. It's like I didn't had the script installed in the first place. |
|
|
Try this version:
function $x(p, context) {
if (!context) context = document;
var i, arr = [], xpr = document.evaluate(p, context, null, 6, null);
for (i=0; item=xpr.snapshotItem(i); i++) arr.push(item);
return arr;
}
var links = $x("//a[contains(@href, 'imdb.com/title/')]");
if (links.length) {
links.forEach(function(link,i) {
if (!link.hasChildNodes()) {
if (!GM_getValue(link.href)) {
GM_xmlhttpRequest({
method: "get",
url: link.href,
onload: rs(i)
});
}
}
});
}
function rs(i) {
return function(e) {
var title = e.responseText.split("<title>")[1].split("</title>")[0];
links[i].textContent = title;
GM_setValue(links[i].href, title);
}
}
This is just alpha, I haven't tried it yet. |
|
|
Thanks, but now it seems like something is wrong. The text-links doesn't change to the IMDb-title, and the images-links still changes to the IMDb-titles. |
|
|
I updated the script so image links won't be changed. |
|
|
Thanks for a very useful script, but how do I do so "jpg"- and "png"-files don't get replaced by the title? |
|
|
Updated the script a little.
Also, http://*.imdb.com will be excluded.
|
|
|
Need to add an exclude: http://us.imdb.com/* !! |
