j"19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAutM¼c<!DOCTYPE html><!-- This site was created in Webflow. http://www.webflow.com -->
<!-- Last Published: Fri Apr 05 2019 13:51:32 GMT+0000 (UTC) -->
<html>
<head>
<meta charset="utf-8" />
<title>Kwaba Games</title>
<meta content="width=device-width, initial-scale=1" name="viewport" />
<meta content="Webflow" name="generator" />
<link href="https://bico.media/b://db1228d1e19bf9217e90938b874b3572bbf8d1b29dd9c01d7ff09ec516e9f3d8/"
rel="stylesheet" type="text/css" />
<link href="https://bico.media/b://db1228d1e19bf9217e90938b874b3572bbf8d1b29dd9c01d7ff09ec516e9f3d8/"
rel="stylesheet" type="text/css" />
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.4.7/webfont.js" type="text/javascript"></script>
<script
type="text/javascript">WebFont.load({ google: { families: ["Droid Sans:400,700", "Varela Round:400"] } });</script>
<script
type="text/javascript">!function (o, c) { var n = c.documentElement, t = " w-mod-"; n.className += t + "js", ("ontouchstart" in o || o.DocumentTouch && c instanceof DocumentTouch) && (n.className += t + "touch") }(window, document);</script>
<link href="https://bico.media/9006fa0c4e98a1140d564f9d8fa10ba7bcb3e93563dcd5f0bae758dab4f04970.ico" rel="shortcut icon"
type="image/x-icon" />
<link href="https://bico.media/9006fa0c4e98a1140d564f9d8fa10ba7bcb3e93563dcd5f0bae758dab4f04970.ico" rel="shortcut icon"
type="image/x-icon" />
</head>
<body class="body">
<div class="section"><img onerror="imgError(this);" src="https://bico.media/1fffd32f3be9748827b7dbac4051e08bf2858c7f4481e8866edbb916fb70889d" width="100"
alt="" />
<h3>How Good Are Your Tick Tac Toe Skills Challange The BSV Ticker!</h3>
</div>
<script>
function imgError(image) {
image.onerror = "";
image.src = "https://bico.media/1fffd32f3be9748827b7dbac4051e08bf2858c7f4481e8866edbb916fb70889d";
return true;
}
</script>
<p>: <script language="JavaScript">
var x = "https://bico.media/635866c6f519caaf3f373e22757fed3b71db8d35b44465c5425ffef46a37061b.gif";
var o = "https://bico.media/bdfabce86f56d5c010f11f4b5a1edf78fbf5b8b21ae6bd4777034f795fceb3e2.gif";
var blank = "https://bico.media/8f3036b0db079e7193f42c818ad5c095b4d01184e3094796451ac4473eb8eed1";
var pause = 0;
var all = 0;
var a = 0;
var b = 0;
var c = 0;
var d = 0;
var e = 0;
var f = 0;
var g = 0;
var h = 0;
var i = 0;
var temp="";
var ok = 0;
var cf = 0;
var choice=9;
var aRandomNumber = 0;
var comp = 0;
var t = 0;
var wn = 0;
var ls = 0;
var ts = 0;
function logicOne() {
if ((a==1)&&(b==1)&&(c==1)) all=1;
if ((a==1)&&(d==1)&&(g==1)) all=1;
if ((a==1)&&(e==1)&&(i==1)) all=1;
if ((b==1)&&(e==1)&&(h==1)) all=1;
if ((d==1)&&(e==1)&&(f==1)) all=1;
if ((g==1)&&(h==1)&&(i==1)) all=1;
if ((c==1)&&(f==1)&&(i==1)) all=1;
if ((g==1)&&(e==1)&&(c==1)) all=1;
if ((a==2)&&(b==2)&&(c==2)) all=2;
if ((a==2)&&(d==2)&&(g==2)) all=2;
if ((a==2)&&(e==2)&&(i==2)) all=2;
if ((b==2)&&(e==2)&&(h==2)) all=2;
if ((d==2)&&(e==2)&&(f==2)) all=2;
if ((g==2)&&(h==2)&&(i==2)) all=2;
if ((c==2)&&(f==2)&&(i==2)) all=2;
if ((g==2)&&(e==2)&&(c==2)) all=2;
if ((a != 0)&&(b != 0)&&(c != 0)&&(d != 0)&&(e != 0)&&(f != 0)&&(g != 0)&&(h != 0)&&(i != 0)&&(all == 0)) all = 3;
}
function logicTwo() {
if ((a==2)&&(b==2)&&(c== 0)&&(temp=="")) temp="C";
if ((a==2)&&(b== 0)&&(c==2)&&(temp=="")) temp="B";
if ((a== 0)&&(b==2)&&(c==2)&&(temp=="")) temp="A";
if ((a==2)&&(d==2)&&(g== 0)&&(temp=="")) temp="G";
if ((a==2)&&(d== 0)&&(g==2)&&(temp=="")) temp="D";
if ((a== 0)&&(d==2)&&(g==2)&&(temp=="")) temp="A";
if ((a==2)&&(e==2)&&(i== 0)&&(temp=="")) temp="I";
if ((a==2)&&(e== 0)&&(i==2)&&(temp=="")) temp="E";
if ((a== 0)&&(e==2)&&(i==2)&&(temp=="")) temp="A";
if ((b==2)&&(e==2)&&(h== 0)&&(temp=="")) temp="H";
if ((b==2)&&(e== 0)&&(h==2)&&(temp=="")) temp="E";
if ((b== 0)&&(e==2)&&(h==2)&&(temp=="")) temp="B";
if ((d==2)&&(e==2)&&(f== 0)&&(temp=="")) temp="F";
if ((d==2)&&(e== 0)&&(f==2)&&(temp=="")) temp="E";
if ((d== 0)&&(e==2)&&(f==2)&&(temp=="")) temp="D";
if ((g==2)&&(h==2)&&(i== 0)&&(temp=="")) temp="I";
if ((g==2)&&(h== 0)&&(i==2)&&(temp=="")) temp="H";
if ((g== 0)&&(h==2)&&(i==2)&&(temp=="")) temp="G";
if ((c==2)&&(f==2)&&(i== 0)&&(temp=="")) temp="I";
if ((c==2)&&(f== 0)&&(i==2)&&(temp=="")) temp="F";
if ((c== 0)&&(f==2)&&(i==2)&&(temp=="")) temp="C";
if ((g==2)&&(e==2)&&(c== 0)&&(temp=="")) temp="C";
if ((g==2)&&(e== 0)&&(c==2)&&(temp=="")) temp="E";
if ((g== 0)&&(e==2)&&(c==2)&&(temp=="")) temp="G";
}
function logicThree() {
if ((a==1)&&(b==1)&&(c==0)&&(temp=="")) temp="C";
if ((a==1)&&(b==0)&&(c==1)&&(temp=="")) temp="B";
if ((a==0)&&(b==1)&&(c==1)&&(temp=="")) temp="A";
if ((a==1)&&(d==1)&&(g==0)&&(temp=="")) temp="G";
if ((a==1)&&(d==0)&&(g==1)&&(temp=="")) temp="D";
if ((a==0)&&(d==1)&&(g==1)&&(temp=="")) temp="A";
if ((a==1)&&(e==1)&&(i==0)&&(temp=="")) temp="I";
if ((a==1)&&(e==0)&&(i==1)&&(temp=="")) temp="E";
if ((a==0)&&(e==1)&&(i==1)&&(temp=="")) temp="A";
if ((b==1)&&(e==1)&&(h==0)&&(temp=="")) temp="H";
if ((b==1)&&(e==0)&&(h==1)&&(temp=="")) temp="E";
if ((b==0)&&(e==1)&&(h==1)&&(temp=="")) temp="B";
if ((d==1)&&(e==1)&&(f==0)&&(temp=="")) temp="F";
if ((d==1)&&(e==0)&&(f==1)&&(temp=="")) temp="E";
if ((d==0)&&(e==1)&&(f==1)&&(temp=="")) temp="D";
if ((g==1)&&(h==1)&&(i==0)&&(temp=="")) temp="I";
if ((g==1)&&(h==0)&&(i==1)&&(temp=="")) temp="H";
if ((g==0)&&(h==1)&&(i==1)&&(temp=="")) temp="G";
if ((c==1)&&(f==1)&&(i==0)&&(temp=="")) temp="I";
if ((c==1)&&(f==0)&&(i==1)&&(temp=="")) temp="F";
if ((c==0)&&(f==1)&&(i==1)&&(temp=="")) temp="C";
if ((g==1)&&(e==1)&&(c==0)&&(temp=="")) temp="C";
if ((g==1)&&(e==0)&&(c==1)&&(temp=="")) temp="E";
if ((g==0)&&(e==1)&&(c==1)&&(temp=="")) temp="G";
}
function clearOut() {
document.game.you.value="0";
document.game.computer.value="0";
document.game.ties.value="0";
}
function checkSpace() {
if ((temp=="A")&&(a==0)) {
ok=1;
if (cf==0) a=1;
if (cf==1) a=2;
}
if ((temp=="B")&&(b==0)) {
ok=1;
if (cf==0) b=1;
if (cf==1) b=2;
}
if ((temp=="C")&&(c==0)) {
ok=1;
if (cf==0) c=1;
if (cf==1) c=2;
}
if ((temp=="D")&&(d==0)) {
ok=1;
if (cf==0) d=1;
if (cf==1) d=2;
}
if ((temp=="E")&&(e==0)) {
ok=1;
if (cf==0) e=1;
if (cf==1) e=2;
}
if ((temp=="F")&&(f==0)) {
ok=1
if (cf==0) f=1;
if (cf==1) f=2;
}
if ((temp=="G")&&(g==0)) {
ok=1
if (cf==0) g=1;
if (cf==1) g=2;
}
if ((temp=="H")&&(h==0)) {
ok=1;
if (cf==0) h=1;
if (cf==1) h=2;
}
if ((temp=="I")&&(i==0)) {
ok=1;
if (cf==0) i=1;
if (cf==1) i=2;
}
}
function yourChoice(chName) {
pause = 0;
if (all!=0) ended();
if (all==0) {
cf = 0;
ok = 0;
temp=chName;
checkSpace();
if (ok==1) {
document.images[chName].src = x;
}
if (ok==0)taken();
process();
if ((all==0)&&(pause==0)) myChoice();
}
}
function taken() {
alert("This cell in not empty! Try another")
pause=1;
}
function myChoice() {
temp="";
ok = 0;
cf=1;
logicTwo();
logicThree();
checkSpace();
while(ok==0) {
aRandomNumber=Math.random()
comp=Math.round((choice-1)*aRandomNumber)+1;
if (comp==1) temp="A";
if (comp==2) temp="B";
if (comp==3) temp="C";
if (comp==4) temp="D";
if (comp==5) temp="E";
if (comp==6) temp="F";
if (comp==7) temp="G";
if (comp==8) temp="H";
if (comp==9) temp="I";
checkSpace();
}
document.images[temp].src= o;
process();
}
function ended() {
alert("Game over! To play once more press a button 'New Game'")
}
function process() {
logicOne();
if (all==1){ alert("You win!"); wn++; }
if (all==2){ alert("You lose!"); ls++; }
if (all==3){ alert("Draw!"); ts++; }
if (all!=0) {
document.game.you.value = wn;
document.game.computer.value = ls;
document.game.ties.value = ts;
}
}
function playAgain() {
if (all==0) {
if(confirm("Are You Sure")) reset();
}
if (all>0) reset();
}
function reset() {
all = 0;
a = 0;
b = 0;
c = 0;
d = 0;
e = 0;
f = 0;
g = 0;
h = 0;
i = 0;
temp="";
ok = 0;
cf = 0;
choice=9;
aRandomNumber = 0;
comp = 0;
document.images.A.src= blank;
document.images.B.src= blank;
document.images.C.src= blank;
document.images.D.src= blank;
document.images.E.src= blank;
document.images.F.src= blank;
document.images.G.src= blank;
document.images.H.src= blank;
document.images.I.src= blank;
if (t==0) { t=2; myChoice(); }
t--;
}
var ie4 = (document.all) ? true : false;
var nn4 = (document.layers) ? true : false;
</script> </p>
<p><br>
</p>
<form name="game">
<div align="center"><center><table border="0">
<TBODY>
<tr>
<td><table border="1" borderColor="#000000" cellPadding="0" cellSpacing="0">
<TBODY>
<tr>
<td><a href="javascript:yourChoice('A')"><img border="0" height="61" name="A"
src="https://bico.media/8f3036b0db079e7193f42c818ad5c095b4d01184e3094796451ac4473eb8eed1.jpg" width="56"></a></td>
<td><a href="javascript:yourChoice('B')"><img border="0" height="61" name="B"
src="https://bico.media/8f3036b0db079e7193f42c818ad5c095b4d01184e3094796451ac4473eb8eed1.jpg" width="56"></a></td>
<td><a href="javascript:yourChoice('C')"><img border="0" height="61" name="C"
src="https://bico.media/8f3036b0db079e7193f42c818ad5c095b4d01184e3094796451ac4473eb8eed1.jpg" width="56"></a></td>
</tr>
<tr>
<td><a href="javascript:yourChoice('D')"><img border="0" height="61" name="D"
src="https://bico.media/8f3036b0db079e7193f42c818ad5c095b4d01184e3094796451ac4473eb8eed1.jpg" width="56"></a></td>
<td><a href="javascript:yourChoice('E')"><img border="0" height="61" name="E"
src="https://bico.media/8f3036b0db079e7193f42c818ad5c095b4d01184e3094796451ac4473eb8eed1.jpg" width="56"></a></td>
<td><a href="javascript:yourChoice('F')"><img border="0" height="61" name="F"
src="https://bico.media/8f3036b0db079e7193f42c818ad5c095b4d01184e3094796451ac4473eb8eed1.jpg" width="56"></a></td>
</tr>
<tr>
<td><a href="javascript:yourChoice('G')"><img border="0" height="61" name="G"
src="https://bico.media/8f3036b0db079e7193f42c818ad5c095b4d01184e3094796451ac4473eb8eed1.jpg" width="56"></a></td>
<td><a href="javascript:yourChoice('H')"><img border="0" height="61" name="H"
src="https://bico.media/8f3036b0db079e7193f42c818ad5c095b4d01184e3094796451ac4473eb8eed1.jpg" width="56"></a></td>
<td><a href="javascript:yourChoice('I')"><img border="0" height="61" name="I"
src="https://bico.media/8f3036b0db079e7193f42c818ad5c095b4d01184e3094796451ac4473eb8eed1.jpg" width="56"></a></td>
</tr>
</TBODY>
</table>
</td>
<td><table>
<TBODY>
<tr colspan="2">
<td><font face="MS Sans Serif" size="1"><b>Score:</b></font></td>
</tr>
<tr>
<td><font face="MS Sans Serif" size="1"><input name="you" size="5"
style="font-family: MS Sans Serif; font-size: 1"></font></td>
<td><font face="MS Sans Serif" size="1">You</font></td>
</tr>
<tr>
<td><font face="MS Sans Serif" size="1"><input name="computer" size="5"
style="font-family: MS Sans Serif; font-size: 1"></font></td>
<td><font face="MS Sans Serif" size="1">BSV</font></td>
</tr>
<tr>
<td><font face="MS Sans Serif" size="1"><input name="ties" size="5"
style="font-family: MS Sans Serif; font-size: 1"></font></td>
<td><font face="MS Sans Serif" size="1">Draw</font></td>
</tr>
</TBODY>
</table>
</td>
</tr>
</TBODY>
</table>
</center></div><div align="center"><center><p><input onclick="playAgain();" type="button"
value="New Game"
style="font-family: MS Sans Serif; font-size: 1; font-weight: bold"> </p>
</center></div>
</form>
<br>
<div class="section-4" data-ix="hide-info">
<div class="div-block-2">
<h4 class="heading">Welcome to KwabaGames</h4>
<div class="div-block-3" data-ix="hide-info">
<div onclick="removeInfo()" class="text-block">X</div>
</div>
<script>
function removeInfo() {
document.getElementsByClassName('section-4')[0].innerHTML = ''
}
</script>
</div>
<div class="div-block">
<p class="paragraph">KwabaGames is a fully-autonomous, real-time, public Game message board saved permanently on
the BitcoinSV blockchain. While most webapps use a private server to store and serve your data, KwabaGames
doesn't have a backend at all!
it will continue to work exactly the same
indefinitely without any maintenance or sensorship. find your post on the <a
href="https://whatsonchain.com/address/18PbjZ8423R1YdiRFYgWtY1kd492FRG68z">BSV Blockchain.</a><br>
</div>
</div>
<div class="section-3">
<div class="div-block-2">
<h4 class="heading">Post something about this LiveStream:</h4>
</div>
<div class="form-block w-form">
<form onsubmit="return false;" id="email-form" name="email-form" data-name="Email Form" class="form">
<textarea oninput="convertTextToOpReturn()" id="field" name="field" placeholder="Enter some text..."
maxlength="280" class="textarea w-input"></textarea>
<div class="div-block-7">
<input oninput="convertTextToOpReturn()" type="text" class="text-field-2 w-input" maxlength="25"
name="field-2" data-name="Field 2" placeholder="Display name" id="field-2" required="" />
<div class="div-block-9">
<div class="div-block-10">
<div id="my-money-button"></div>
</div>
</div>
</div>
<script>
// opReturnScript is the data included in the Bitcoin script"
var opReturnScript = '';
// the data included in the opreturn must be hex encoded.
function convertToHex(str) {
var hex = '';
for (var i = 0; i < str.length; i++) {
hex += '' + str.charCodeAt(i).toString(16);
}
return hex;
}
function convertTextToOpReturn() {
time = new Date().getTime();
opReturnScript = "OP_RETURN " + convertToHex('18PbjZ8423R1YdiRFYgWtY1kd492FRG68z') + " " + convertToHex(document.getElementById('field').value) + " " + convertToHex(document.getElementById('field-2').value) + ' ' + convertToHex(new Date().getTime().toString());
//the money button must be rerendered every time the user inputs text in order to submit the correct opreturn data
moneyButton.render(div, {
outputs: [{
amount: "0",
currency: "USD",
type: 'SCRIPT',
script: opReturnScript
}, {
to: '18PbjZ8423R1YdiRFYgWtY1kd492FRG68z',
amount: "0.00013",
currency: "BSV",
}]
})
}
</script>
</form>
</div>
</div>
<div class='section-7'>
<div class="div-block-5">
<h4 class="heading">Recent posts:</h4>
<div class="div-block-11">
<div class="text-block-5">Posts per page: </div>
<select id='selector' onchange="rerenderPosts()">
<option value="10">10</option>
<option value="50">50</option>
<option value="100">100</option>
</select>
</div>
</div>
</div>
<div class="section-5" id="posts-section">
<!-- This is where posts go -->
</div>
</body>
<script src="https://www.moneybutton.com/moneybutton.js"></script>
<script>
postsPerPage = 10;
dateFromString = (str) => new Date(JSON.parse(str));
function filterInvalidTransactions(txlist) {
newList = txlist.filter(tx => {
paymentMade = false;
if(tx.out[1]&&tx.out[2]){
paymentMade = (tx.out[1].e.v == 13000 && tx.out[1].e.a == "18PbjZ8423R1YdiRFYgWtY1kd492FRG68z")||(tx.out[2].e.v == 13000 && tx.out[2].e.a == "1E8nULd6vAdZK45QbkHr9iG33Uo2VZMh6i")
}
validData = tx.out[0].s1 && tx.out[0].s2 && tx.out[0].s3 && tx.out[0].s4
testPost=tx.tx.h=="06dfe758f959572e84ecab0724c02f65e680f8a92825c75096fa02785b36ec24" ||tx.tx.h=="80ea356174421bb04060702f9946e84c68bd843e43dc23d822559fdc6ed62aa4"
valid = paymentMade&&validData&&!testPost;
return valid;
})
return newList;
}
function rerenderPosts() {
postsPerPage = JSON.parse(document.getElementById('selector').value)
loadPosts(postsPerPage);
}
function createPostHTML(content, name, date) {
postContainer = document.createElement('div');
postContainer.className = 'div-block-4';
paragraph = document.createElement('p');
paragraph.className = 'paragraph';
nameDateContainer = document.createElement('div');
nameDateContainer.className = 'div-block-6';
dateElement = document.createElement('div');
dateElement.className = 'text-block-2';
nameElement = document.createElement('div');
nameElement.className = 'text-block-3';
dateElement.innerHTML = date.customFormat('#h#:#mm##ampm# - #D# #MMM# #YYYY# ');
nameElement.innerHTML = name;
nameDateContainer.innerHTML += dateElement.outerHTML + nameElement.outerHTML;
paragraph.innerHTML = content;
postContainer.innerHTML += paragraph.outerHTML + nameDateContainer.outerHTML;
return postContainer;
document.getElementsByClassName('section-5').insertAdjacentHTML('beforeend')
}
var div = document.getElementById('my-money-button')
moneyButton.render(div, {
outputs: [{
amount: "0",
currency: "USD",
type: 'SCRIPT',
script: 'OP_RETURN ' + convertToHex('18PbjZ8423R1YdiRFYgWtY1kd492FRG68z')
}, {
to: '18PbjZ8423R1YdiRFYgWtY1kd492FRG68z',
amount: "0.00013",
currency: "BSV",
}]
})
function loadPosts(x) {
var query = { "v": 3, "q": { "find": { "out.s1": "18PbjZ8423R1YdiRFYgWtY1kd492FRG68z" }, "limit": x + 50 } };
var b64 = btoa(JSON.stringify(query));
var url = "https://genesis.bitdb.network/q/1FnauZ9aUH2Bex6JzdcV4eNX7oLSSEbxtN/" + b64;
var header = {
headers: { key: "1EsRL44h3xNm8G4hT35ns3nNPicAHWAftc" }
};
fetch(url, header).then(function (r) {
return r.json()
}).then(function (r) {
postsSection = document.getElementById('posts-section')
var result = JSON.stringify(r, null, 2);
result = JSON.parse(result);
console.log(result);
transactions = result.u.concat(result.c);
transactions = filterInvalidTransactions(transactions);
transactions.sort(function(a,b){
return JSON.parse(b.out[0].s4)-JSON.parse(a.out[0].s4)
})
console.log(transactions);
while (transactions.length > postsPerPage) {
transactions.pop()
}
postsSection.innerHTML = '';
transactions.map(tx => {
post = createPostHTML(tx.out[0].s2, tx.out[0].s3, dateFromString(tx.out[0].s4))
document.getElementById('posts-section').appendChild(post)
})
})
}
loadPosts(postsPerPage);
socketQuery = { "v": 3, "q": { "find": { "out.s1": "18PbjZ8423R1YdiRFYgWtY1kd492FRG68z" }, } };
var b64 = btoa(JSON.stringify(socketQuery))
// Subscribe to EventSource
var url = "https://genesis.bitdb.network/s/1FnauZ9aUH2Bex6JzdcV4eNX7oLSSEbxtN/" + b64;
var socket = new EventSource(url)
// Handle new messages
socket.onmessage = function (e) {
transactions = JSON.parse(JSON.stringify(JSON.parse(e.data), null, 2)).data
transactions = filterInvalidTransactions(transactions);
transactions.map(tx => {
post = createPostHTML(tx.out[0].s2, tx.out[0].s3, dateFromString(tx.out[0].s4));
document.getElementById('posts-section').insertAdjacentElement('afterBegin', post);
posts = document.getElementsByClassName('div-block-4');
while (posts.length > postsPerPage) {
document.getElementById('posts-section').removeChild(posts[postsPerPage]);
}
})
}
</script>
<script>
// Copyright (c),Kwaba ([email protected])
// All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1) Redistributions of source code must retain the above copyright
// notice verbatim, and this list of conditions and the following
// disclaimer, either verbatim or through the inclusion of this
// file's url.
// 2) Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in
// the documentation and/or other materials provided with the
// distribution.
// 3) You must include in the source code a description of any
// modifications made to the code (including bugfixes).
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
// token: description: example:
// #YYYY# 4-digit year 1999
// #YY# 2-digit year 99
// #MMMM# full month name February
// #MMM# 3-letter month name Feb
// #MM# 2-digit month number 02
// #M# month number 2
// #DDDD# full weekday name Wednesday
// #DDD# 3-letter weekday name Wed
// #DD# 2-digit day number 09
// #D# day number 9
// #th# day ordinal suffix nd
// #hhhh# 2 digit military hour 17
// #hhh# military/24-based hour 17
// #hh# 2-digit hour 05
// #h# hour 5
// #mm# 2-digit minute 07
// #m# minute 7
// #ss# 2-digit second 09
// #s# second 9
// #ampm# "am" or "pm" pm
// #AMPM# "AM" or "PM" PM
Date.prototype.customFormat = function (formatString) {
var YYYY, YY, MMMM, MMM, MM, M, DDDD, DDD, DD, D, hhhh, hhh, hh, h, mm, m, ss, s, ampm, AMPM, dMod, th;
YY = ((YYYY = this.getFullYear()) + "").slice(-2);
MM = (M = this.getMonth() + 1) < 10 ? ('0' + M) : M;
MMM = (MMMM = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"][M - 1]).substring(0, 3);
DD = (D = this.getDate()) < 10 ? ('0' + D) : D;
DDD = (DDDD = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"][this.getDay()]).substring(0, 3);
th = (D >= 10 && D <= 20) ? 'th' : ((dMod = D % 10) == 1) ? 'st' : (dMod == 2) ? 'nd' : (dMod == 3) ? 'rd' : 'th';
formatString = formatString.replace("#YYYY#", YYYY).replace("#YY#", YY).replace("#MMMM#", MMMM).replace("#MMM#", MMM).replace("#MM#", MM).replace("#M#", M).replace("#DDDD#", DDDD).replace("#DDD#", DDD).replace("#DD#", DD).replace("#D#", D).replace("#th#", th);
h = (hhh = this.getHours());
if (h == 0) h = 24;
if (h > 12) h -= 12;
hh = h < 10 ? ('0' + h) : h;
hhhh = hhh < 10 ? ('0' + hhh) : hhh;
AMPM = (ampm = hhh < 12 ? 'am' : 'pm').toUpperCase();
mm = (m = this.getMinutes()) < 10 ? ('0' + m) : m;
ss = (s = this.getSeconds()) < 10 ? ('0' + s) : s;
return formatString.replace("#hhhh#", hhhh).replace("#hhh#", hhh).replace("#hh#", hh).replace("#h#", h).replace("#mm#", mm).replace("#m#", m).replace("#ss#", ss).replace("#s#", s).replace("#ampm#", ampm).replace("#AMPM#", AMPM);
};
</script>
</html>
text/htmlutf-8kwabaGames_TickTacToe.html
https://whatsonchain.com/tx/7189dc6c903e6ba7dc90bd1e2be6c7f8da4f7b46374827b1c62d6b756f2af59c