j"19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAutME<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<script
type="text/javascript"
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script>
<script
type="text/javascript"
src="https://unpkg.com/bsv@0.26.4/bsv.min.js"
integrity="sha256-5Mkg8jWEZkzGqdeJQyCA2DbGM9ivvC8c30kP55PjJSA="
crossorigin="anonymous"></script>
<script type="text/javascript">
function init(){
let count = location.pathname.split("/").length;
let b58Value = location.pathname.split("/")[count-1];
let txid = bsv.encoding.Base58.fromString(b58Value).toBuffer().toString('hex');
getURL(txid);
}
function getURL(txid){
let b64 = new Object({
"v": 3,
"q": {
"find": {
"out.s1": "1SymRe7erxM46GByucUWnB9fEEMgo7spd",
"tx.h": { "$regex": "^"+ txid + "", "$options": "i" }
},
"limit": 10
},
"r": {
"f": "[.[] | .out[0] | { s2: .s2} ]"
}
});
let query = btoa(JSON.stringify(b64));
console.log(query);
$.ajax({
url: 'https://babel.bitdb.network/q/1DHDifPvtPgKFPZMRSxmVHhiPvFmxZwbfh/' + query,
type: 'GET',
dataType: 'json',
success: function(data) {
if (data.c.length > 0){
let url = data.c[0].s2;
console.log(url);
window.location.replace(url);
}
else if (data.u.length > 0){
let url = data.u[0].s2;
console.log(url);
window.location.replace(url);
}
else {
console.log('error: No URL was found.');
document.querySelector("#error").innerHTML = "<b>No URL was found.</b>";
}
},
error: function(data) {
console.log('error:', data);
},
headers : {
'key' : '1SymRe7erxM46GByucUWnB9fEEMgo7spd',
}
});
}
</script>
</head>
<body onload="init();">
<div id="error"></div>
</body>
</html>text/html; charset=utf-8UTF-8SymRe_redirect.html
https://whatsonchain.com/tx/bbf3e1f8671f04dec1f79f41c608b0b02a0949a7bffb7ee00a5fdfbc26bfc6e2