IMDB - add Rottentomatoes info

By Curtis Gibby Last update Mar 10, 2013 — Installed 56,000 times.

Script on Google Chrome

in
Subscribe to Script on Google Chrome 18 posts, 8 voices



VineetG User
ChromeWindows

Hi,

Do you have any plans to make this script compatible with Google Chrome? I am dying to have this script on Google Chrome.

 
anacrolix User
ChromeWindows

So am I. Please consider supporting Chrome.

 
Curtis Gibby Script's Author
FirefoxWindows

I'm working on adding Chrome support.

Update: In researching adding support for Google Chrome, I've found out that it does not support the GM_xmlhttpRequest function, the functionality of which is vital for this userscript. (i.e. getting the information from the RT page about this specific movie). They say this is because cross-site xml http requests are inherently unsafe. There's a possible workaround involving scraping the info through Yahoo! Pipes that I'm looking into, but I'm not holding my breath.

 
FarzadB User
ChromeWindows

Great work on this Curtis. I just wanted to mention that the Blank Canvas Script Handler extension for Chrome is designed to provide better Greasemonkey script support for Chrome and they implemented GM_xmlhttpRequest support for POST requests last month.

 
InterClaw User
ChromeWindows

Still, I can't get this user script to work with Blank Canvas Script Handler. Too bad. I really, really like this. :(

I've been a long time user of Firefox, but have just now started to move over to Chrome and love most things with it. There's just one thing missing...... ;)

 
Gaba User
ChromeX11

Hi,
the author of 'Tampermonkey' script claims that this bug can be fixed. You can see the following at the extension's page on Chrome's Webstore, I paste it here for easier access:

-Jan 2 days ago
@akountouris: I debugged this a little bit. GM_xmlhttpRequest is doing exactly what it should!

There seems top be a bug in chromes "document.evaluate" magic. (http://code.google.com/p/chromium/issues/detail...)

If you want, just replace all document.evaluate calls with something similar and the script is workling-

For example:

findPattern = "//p[@class='critic_stats']";
results = document.evaluate(findPattern, doc, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null );

becomes to:
var e = doc.getElementsByClassName('critic_stats');

-akountouris 5 days ago
Great extension...but...
GM_xmlhttpRequest does not seem to work in some cases. E.g. the userscript "IMDB - add Rottentomatoes info" at http://userscripts.org/scripts/show/12897
is there a workaround/fix?

 
derjanb Scriptwright
ChromeX11

The author of Tampermonkey (me ;)) already fixed this issue. So there is no need to do anything, but waiting for the next release. ;)

 
Curtis Gibby Script's Author
FirefoxWindows

Fantastic, thanks _der_. I had started trying to modify the script to get rid of all those document.evaluate() calls, but I'll just let people know that they can expect this to work correctly once you release your update.

 
Gaba User
ChromeX11

Hi Curtis,
this script is still not working properly when used through 'Tampermonkey'.
If you click on 'Total Reviews', 'Fresh Reviews' or 'Rotten Reviews' for any movie it will take you to 'Page Not Found' error.
Also, what's with the changing the IMDB's icon in the tab? Is this necessary (or intended)? Because I feel it makes the script heavier and really adds nothing.

I'm using Chrome 10.0.648.204 in Ubuntu 10.10.

Cheers,
Gabriel

 
Curtis Gibby Script's Author
FirefoxWindows

Gaba,

The "Page not found" error appears to be unrelated to your using Tampermonkey/Chrome, since I'm now getting it on Greasemonkey/Firefox. I'm guessing that Rotten Tomatoes made some change on their site that has messed up those URLs. I'll take a look at that this weekend and see if I can't release a fixed version.

As for the icons, I'm not changing the IMDb icon at all. I load a few data:image/png images to represent the various icons added by the script itself (the comment bubbles, the rotten splat or fresh tomato, etc.) but I don't touch the IMDb icon.

Curtis

 
Gaba User
ChromeX11

Ok, consider this a bug report then :)

This script changes the tab's icon from IMDB's default to Rotten Tomatoe's icon.

 
Curtis Gibby Script's Author
FirefoxWindows

Gaba,

I just released version 2.7.1 that fixes the problem with the reviews links being broken. I'm guessing that now you'll have a functional script on Chrome (provided that you have the Tampermonkey extension installed).

As for the favicon changing to the RT tomato, I'm guessing that's because the script has to load the whole RT page (including the favicon). The icon doesn't change in Firefox, and I don't know that there's anything that I can do about it in Chrome at the moment.

Rotten Tomatoes just released an API that can load *some* of their info via AJAX (thus eliminating the need to go get the whole HTML page), but for now, they don't send back the "Consensus" part of the RT movie info, which I feel is vital to have as part of this userscript. I've got a request in on their developers forum for them to add this feature to their API, and when they do, I'll be able to use that instead, which should make the script faster in general, and also fix the favicon issue in Chrome.

 
Gaba User
ChromeX11

Hi Curtis,
indeed the links are working and overall IMDB feels a bit lighter now (maybe it's just a feeling) As for the icon changing, it doesn't really bother me that much. I just wish the RottenTomatoes info would show up faster; so I'll wait for the API update and hopefully that'll do the trick.
Thanks for the reply.

Regards,
Gabriel

 
Royal2000H Scriptwright
ChromeWindows

Hi,

I'm on Google Chrome. Unfortunately, the script just has a never-ending "Rotten Tomatoes: checking" and spin wheel. Metascore still works - though I don't really need that.

Then, I saw this thread and uninstalled the script, installed Tampermonkey, and reinstalled the script (through Tampermonkey). Same situation.

 
Gaba User
ChromeX11

Yeah, it stopped working for me too.
Besides, I don't now what it does in the background, but it seems that IMDB takes a lot longer to load (I mean the whole page, not just the 'RottenTomatoes' info) with this script on.

 
anacrolix User
ChromeWindows

Take a look at this extension: https://chrome.google.com/webstore/detail/dhmli...

 
Curtis Gibby Script's Author
FirefoxWindows

I released version 3.0 today and checked that it does work with TamperMonkey. I think the problem with the favicon being replaced by RT's tomato icon will be fixed by this update.

 
anacrolix User
ChromeX11

I've updated my Chrome extension that wraps this script: https://chrome.google.com/webstore/detail/dhmli...

Thanks Curtis for the great work.