Answer the question
In order to leave comments, you need to log in
Help to adapt the script for Opera under Greasemonkey (IMDB: shows movie ratings on the actor's page)
I wrote a small script for Opera. It shows the ratings of IMDB movies right on the actor's page:
Connects stupidly through the User JavaScript Folder.
It works as follows: for each movie, a call is made to the movie page, the result is parsed and displayed. At each point in time, there is one call so as not to overload the servers. Therefore, the ratings are not displayed immediately, but at a speed of 1 movie in 2 - 3 seconds.
Issue: The script does not work under Firefox/Greasemonkey.
In the script, I use jQuery, which is included by the IMDB site itself. But jQuery is not included in the head section, but at the very bottom of the page, so I use the scary construct
window.onload = (function() {var chain = window.onload; return function() {dm9_imdb_init(); if (chain) chain();}})();
to start your function. Maybe that's why, or maybe for some other reason, the script does not start under Greasemonkey (I can run simple scripts on it).
To be honest, there was no time to figure it out. If anyone has a desire to dig, or just smart thoughts, I will be glad for your help in adapting the script. It will be possible to arrange this in a separate plugin.
Script: dm9.ru/examples/js/imdb/imdb.user.js
PS About optimization. Yes, everything is slow. But the option “save the rating on your server and give it in one request” contradicts the IMDB user license, and therefore you can’t do this :)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question