Backport of apostrophe handling from stoi.xyz

This commit is contained in:
kleph 2015-09-28 16:16:12 +02:00
parent 721038f587
commit 0a51c351e1

View file

@ -30,6 +30,11 @@
var s_hostname = punycode.toUnicode(location.host)
var s_txt = s_hostname.replace("." + s_base_domain, s_replace);
var apostrophe = s_txt.match(/(l)\./);
if (apostrophe){
s_txt = s_txt.replace(/\./, "'");
}
s_txt = s_txt.replace(/\./g, " ");
s_txt = s_txt.charAt(0).toUpperCase() + s_txt.slice(1);