Ikariam Upgrade Watcher (v1.3.2)

By Anh Tuan Nguyen Dao Last update Oct 26, 2009 — Installed 39,026,720 times.

Fix to support any languages

in
Subscribe to Fix to support any languages 2 posts, 2 voices



oliezekat Scriptwright

Hi,

Nice idea but work only on english server :o(

Use function bellow to extract number from string ;o)

function getIntValue(str, defaultValue) {
  var temp = ""+str;
  temp = temp.replace(/[^-0-9]+/g, "");
  temp = parseInt(temp);
  if (defaultValue != undefined && (temp == undefined || (""+temp == "NaN"))) {
    return defaultValue;
  }
  return temp;
}

 
Anh Tuan Ngu... Script's Author

Thx, I haven't even thought about that. However, I will fix that using your function.

Thanks again.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel