saynul/saynul.html

50 lines
1.3 KiB
HTML

<head>
<title>C'est nul !</title>
<meta charset="utf-8">
<style type="text/css">
h1 {
font-size: 250%;
text-align: center;
margin-top: 50px;
}
</style>
<script src="punycode.min.js">
</script>
<script type="text/javascript">
window.onload = clear;
var s_base_domain = "saynul.eu";
var s_replace = ", c'est nul !";
function clear() {
// Leave the default content if no subdomain given.
if (location.host != s_base_domain) {
var s_hostname = punycode.toUnicode(location.host)
var s_txt = s_hostname.replace("." + s_base_domain, s_replace);
var apostrophe = s_txt.match(/\.(l)\.|^(l)\./);
var napostrophe = s_txt.match(/\.(n)\.|^(n)\./);
if (apostrophe){
s_txt = s_txt.replace(/l\./, "l'");
}
if (napostrophe){
s_txt = s_txt.replace(/n\./, "n'");
}
s_txt = s_txt.replace(/\./g, " ");
s_txt = s_txt.charAt(0).toUpperCase() + s_txt.slice(1);
// header tag and page title
document.getElementById("t").innerHTML = s_txt;
document.title = s_txt;
};
};
</script>
</head>
<body>
<h1 id="t">C'est nul !</h1>
</body>