1

I visit a webpage that I would like to make a little (for me) more user-friendly.

It consists of a list movie titles with links to imdb.com. The IMDB user rating can be viewed as a tooltip (the title attribute), and that's the problem. It takes forever (it feels like ;-) to view the ratings with 50 movies per page.

I tried to alter the page by using the Chrome plugin Stylebot with no luck. (That was after I asked the owner of website if a change could be made...)

Is there a way to make the tooltip visible all the time? Just after the picture would be fine – there is plenty of space for the text.

The code:

<div class="showtitle">
    <a target="_blank" href="htts://www.imdb.com/title/tt1254207/">
        <img src="imdb.png" style="" title="Rating: 6.7/10 (1573 votes)">
    </a>
</div>
user94559
  • 59,196
  • 6
  • 103
  • 103

1 Answers1

0

Installed the Chrome Pugin RWeb that enables custom JavaScript.

The following works but improvements to my code are welcome – has hardly done any JavaScript before ;-)

ready(function() {
var showtitleList = document.getElementsByClassName("showtitle");
for (var i=0; i<showtitleList.length; i++) {
  var elementAList = showtitleList[i].getElementsByTagName("a");
  if(elementAList.length>0){
    var aImgElement = elementAList[0].getElementsByTagName("img");
    if(aImgElement.length>0){
      var imdbRating = aImgElement[0].title;
      elementAList[0].innerHTML = imdbRating;
    }
  }
}

});