j"19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAutM
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.js"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-65703744-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-65703744-1');
</script>
<!-- This line can go anywhere -->
<script src="https://www.moneybutton.com/moneybutton.js"></script>
<title>Twetch Live feed V4</title>
<style>
body {background-color: white;}
body, html{height:100%;}
h2 {
display: block;
font-size: 1.5em;
margin-top: 0.83em;
margin-bottom: 0.83em;
margin-left: 0;
margin-right: 0;
font-weight: bold;
}
.scroll_y{
vertical-align: top;
overflow-y: scroll;
height:100%;
}
.table12{
height:100%;
}
.blobs{
border-radius: 1em;
background: #E5E5E5;
padding: .4em .4em .4em .4em;
margin-bottom: .2em;
}
.greycss{border-radius: 1em;
background: #C2CACE;
padding: .4em .4em .4em .4em;
margin-bottom: .2em;}
.bluecss{
border-radius: 1em;
background: #B6DEFC;
padding: .4em .4em .4em .4em;
margin-bottom: .2em;}
.commentsT{
height: 90%;
display: inline-block;}
.onehund{
height: 100%;
}
body {overflow: hidden;}
div.gfa {
margin:0px;
padding:0px;
background-color: #FFFFFF;
width: 100vw;
height: 99vh;
overflow: hidden;
text-align:justify;
display: inline;
}
div.gfb {
margin-top: 0;
margin:.1vw;
padding:.2vw;
padding-top: .2vw;
background-color: #F1F1F3;
width: 54vw;
height: 80vh;
overflow: auto;
text-align:justify;
float:left;
border-radius: .5em;
overflow-x: hidden; // hide horizontal
}
div.gfc {
margin-top: 0;
margin:.1vw;
padding:.2vw;
padding-top: .2vw;
background-color: #F1F1F3;
width: 40vw;
height: 80vh;
overflow: auto;
text-align:justify;
border-radius: .5em;
overflow-x: hidden; // hide horizontal
}
div.gfd {
display: inline;
}
div.gfe {
display:inline-block;
}
div.buser {
display: inline;
font-size: 80%;
}
div.bmessage {
font-size: 110%;
padding-top: .3em;
}
div.bfoot {
font-size: 90%;
padding-top: .4em;
}
div.sma{
font-size: small;
}
</style>
<script>
$(document).ready( function () {
} );
// Write a bitquery
var query = {
"v": 3,
"q": {
"find": {"$or": [{"out.s24": "twetch"}, {"out.s22": "twetch"}]}
},
"r": {
"f": "[.[] | .out[0].h = .tx.h | .out[0] | .t = if .s2 then .s2 else .s14 end | { tw: .t, reply_to: .s18, h: .h, user: .s16} ]"
}
}
// Encode it in base64 format
var b64 = btoa(JSON.stringify(query))
// Subscribe
var bitsocket = new EventSource('https://genesis.bitdb.network/s/1FnauZ9aUH2Bex6JzdcV4eNX7oLSSEbxtN/'+b64)
//Event halder
bitsocket.onmessage = function(e) {
var data2 = JSON.parse(e.data);
var today = new Date();
//console.log(data2.data);
if(data2.data[0].tw){
if(data2.data[0].reply_to == 'post'){
var table = document.getElementById("Posts")
var tc ="greycss"}
else {
var table = document.getElementById("Comments")
var tc = "bluecss"}
var div1 = document.createElement("div");
div1.setAttribute('class', tc);
div1.innerHTML = "<div class='buser'>Moneybutton user#<b>" + data2.data[0].user + '</b>\xa0\xa0\xa0\xa0\xa0\xa0\xa0' + (today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds()) + "</div>";
div1.innerHTML += "<div class='bmessage'>" + data2.data[0].tw + "</div>";
div1.innerHTML += "<div class='bfoot'>Link <a href='https://twetch.app/t/"+data2.data[0].h+"' target='_blank'>"+data2.data[0].h.substr(data2.data[0].h.length - 5)+"</a></div>";
if(data2.data[0].reply_to == 'post'){
}
else {div1.innerHTML += "<div class='bfoot'>in reply to <a href='https://twetch.app/t/"+data2.data[0].reply_to+"' target='_blank'>"+data2.data[0].reply_to.substr(data2.data[0].reply_to.length - 5)+"</a></div>";
}
table.prepend(div1);
}
}
</script>
</head>
<body>
<div class="gfa">
<div><center><h2>Twetch Feed</h2></center></div>
<div class="gfe">
<div id="Posts" class="gfb">Post stream here.</div>
<div id="Comments" class="gfc">Comment stream here.</div>
</div>
<div>
<div class="money-button"
data-to="1799"
data-amount="1"
data-currency="USD"
data-label="Donate"
data-client-identifier="4358a131fcb178b12799fd58b1d20733"
data-button-id="1562856661496"
data-button-data="{}"
data-type="tip"
></div>
<div class="sma">v0.4 *donations help development continue. Thank you.</div>
</div>
</div>
</body>
</html> text/html
index.html
https://whatsonchain.com/tx/cba6bfaf90e7c9bcff640c12e9159fb514b2f058c04bec6170fbdad5df625db0