<?xml version="1.0" encoding="UTF-8"?>
<post>
  <body>Hi znerp!

I changed your script I don't like the abbreviations. So I replaced the 'hrs' and 'mins' abbreviations to the full hour - hours and minute - minutes words.
But this script is great!

Modified full script:

// ==UserScript==
// @name           IMDB runtimes in hours and minutes (changed by Hiromacu)
// @namespace      znerp
// @description    Converts the runtime for films on IMDB from minutes into hours and minutes.
// @include        http://www.imdb.com/title/tt*
// ==/UserScript==

/***********************************************************************
 * I don't like the abbreviations. 
 * So I replaced the 'hrs' and 'mins' abbreviations to the full hour - hours and minute - minutes words.
 * But this script is great!
 *
 * - Hiromacu -
 */

infos = document.evaluate(&quot;//div[@id='tn15content']/div[@class='info']&quot;,
                          document,
                          null,
                          XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
                          null)

for (i = infos.snapshotLength - 1; i &gt;= 0; i--) {
  if (/Runtime:/.test((time = infos.snapshotItem(i)).innerHTML)) {
    time.innerHTML = time.innerHTML.replace(/(\d+) min/g, hourize);
    break;
  }
}
     
function hourize(str, p1, offset, s) {
  var htxt;
  var mtxt;
  minutes = parseInt(p1)
  hours = Math.floor(p1 / 60);
  if (hours &gt; 1) {
  htxt = &quot;hours&quot;;
  }
  else {
  htxt = &quot;hour&quot;;
  }
  minutes = p1 % 60;
  if (minutes &gt; 1) {
  mtxt = &quot;minutes&quot;;
  }
  else {
  mtxt = &quot;minute&quot;;
  }
  return (hours &gt; 0 ? hours + &quot; &quot; + htxt+ &quot;, &quot; : &quot;&quot;) + minutes + &quot; &quot; + mtxt;
}</body>
  <body-html>&lt;p&gt;Hi znerp!&lt;/p&gt;

&lt;p&gt;I changed your script I don't like the abbreviations. So I replaced the 'hrs' and 'mins' abbreviations to the full hour - hours and minute - minutes words.
&lt;br /&gt;But this script is great!&lt;/p&gt;

&lt;p&gt;Modified full script:&lt;/p&gt;

&lt;p&gt;// ==UserScript==
&lt;br /&gt;// @name           IMDB runtimes in hours and minutes (changed by Hiromacu)
&lt;br /&gt;// @namespace      znerp
&lt;br /&gt;// @description    Converts the runtime for films on IMDB from minutes into hours and minutes.
&lt;br /&gt;// @include        &lt;a href=&quot;http://www.imdb.com/title/tt&quot;&gt;http://www.imdb.com/title/tt&lt;/a&gt;*
&lt;br /&gt;// ==/UserScript==&lt;/p&gt;

&lt;p&gt;/***********************************************************************
&lt;br /&gt; * I don't like the abbreviations. 
&lt;br /&gt; * So I replaced the 'hrs' and 'mins' abbreviations to the full hour - hours and minute - minutes words.
&lt;br /&gt; * But this script is great!
&lt;br /&gt; *
&lt;br /&gt; * - Hiromacu -
&lt;br /&gt; */&lt;/p&gt;

&lt;p&gt;infos = document.evaluate(&quot;//div[@id='tn15content']/div[@class='info']&quot;,
&lt;br /&gt;                          document,
&lt;br /&gt;                          null,
&lt;br /&gt;                          XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
&lt;br /&gt;                          null)&lt;/p&gt;

&lt;p&gt;for (i = infos.snapshotLength - 1; i &gt;= 0; i--) {
&lt;br /&gt;  if (/Runtime:/.test((time = infos.snapshotItem(i)).innerHTML)) {
&lt;br /&gt;    time.innerHTML = time.innerHTML.replace(/(\d+) min/g, hourize);
&lt;br /&gt;    break;
&lt;br /&gt;  }
&lt;br /&gt;}
&lt;br /&gt;     
&lt;br /&gt;function hourize(str, p1, offset, s) {
&lt;br /&gt;  var htxt;
&lt;br /&gt;  var mtxt;
&lt;br /&gt;  minutes = parseInt(p1)
&lt;br /&gt;  hours = Math.floor(p1 / 60);
&lt;br /&gt;  if (hours &gt; 1) {
&lt;br /&gt;  htxt = &quot;hours&quot;;
&lt;br /&gt;  }
&lt;br /&gt;  else {
&lt;br /&gt;  htxt = &quot;hour&quot;;
&lt;br /&gt;  }
&lt;br /&gt;  minutes = p1 % 60;
&lt;br /&gt;  if (minutes &gt; 1) {
&lt;br /&gt;  mtxt = &quot;minutes&quot;;
&lt;br /&gt;  }
&lt;br /&gt;  else {
&lt;br /&gt;  mtxt = &quot;minute&quot;;
&lt;br /&gt;  }
&lt;br /&gt;  return (hours &gt; 0 ? hours + &quot; &quot; + htxt+ &quot;, &quot; : &quot;&quot;) + minutes + &quot; &quot; + mtxt;
&lt;br /&gt;}&lt;/p&gt;</body-html>
  <created-at type="datetime">2008-04-07T04:36:02Z</created-at>
  <forumable-id type="integer">24836</forumable-id>
  <forumable-type>Script</forumable-type>
  <id type="integer">68121</id>
  <topic-id type="integer">16033</topic-id>
  <updated-at type="datetime">2008-11-17T00:14:25Z</updated-at>
  <user-agent nil="true"></user-agent>
  <user-id type="integer">48819</user-id>
</post>
