Nostryfied/index.html
Vitor Pamplona b16cfc09f2 Allowing choice of to relays.
Authenticates Sending
2024-01-29 13:46:55 -05:00

221 lines
7.4 KiB
HTML

<!DOCTYPE html>
<html data-theme="light" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Primary Meta Tags -->
<title>Nostryfied</title>
<meta name="title" content="Nostr Backup Service by Nostryfied" />
<meta
name="description"
content="Fetch, backup and broadcast your Nostr events" />
<!-- Favicon -->
<link
rel="shortcut icon"
href="https://res.cloudinary.com/dfquzutga/image/upload/v1677188210/Screenshot_20230224_030530_Canva_2_cwvo5m.jpg"
type="image/x-icon" />
<!-- CSS -->
<link rel="stylesheet" href="style.css" />
<!-- Lightning -->
<meta name="lightning" content="realiefan@ln.tips" />
<!-- PWA -->
<meta name="theme-color" content="#ffffff" />
<link
rel="apple-touch-icon"
href="https://nostr-utils.pages.dev/img/broadcast.png" />
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>How to Optimize Your Website Speed</title>
<meta property="og:title" content="Take you Nostr Backups today with Nostryfied">
<meta property="og:type" content="Broadcast & Export, also Download a Copy of your Data today with just one click">
<meta property="og:image" content="https://res.cloudinary.com/dfquzutga/image/upload/v1677187258/20230224_024801_0000_2_m7hazu.png"> <!-- Replace with the URL of your larger image -->
<meta property="og:url" content="https://nostryfied.online">
<meta property="og:image:width" content="1600" />
</head>
<body>
<main class="container">
<div class="header-space">
<h1>Backup your Nostr Events</h1>
</div>
<div>
<form>
<div>
<form>
<div class="space-between-small">
<p>
From relays
<input
type="text"
class="cool-field"
id="relaySet"
name="relaySet"
placeholder="wss://nos.lol, wss://nostr.mom or leave blank for all" />
</p>
</div>
<div class="space-between-small-left">
<p>
Created from
<input type="date" class="cool-field" id="startDate" name="startDate" min="2020-01-01" value="2020-01-01" />
to
<input type="date" class="cool-field" id="endDate" name="endDate" min="2020-01-01" />
</p>
</div>
<div class="space-between-small">
<p>
By and about
<input
type="text"
id="pubkey"
name="pubkey"
class="cool-field"
onchange="pubkeyOnChange()"
placeholder="Public key (npub or hex)"
required />
</p>
</div>
<div class="space-between-small">
<div class="space-between">
<b>OR</b>
</div>
</div>
<div class="space-between">
<div class="space-between">
<p>
<input type="file" id="file-selector">
</p>
<script>
var fileName = ""
const fileSelector = document.getElementById('file-selector');
fileSelector.addEventListener('change', (event) => {
fileName = event.target.files[0];
$('#fetch-and-broadcast').css('display', 'none')
$('#just-broadcast').css('display', 'inline-block')
});
</script>
</div>
</div>
<div class="space-between-small">
<p>
To relays
<input
type="text"
class="cool-field"
id="relaySetBroadcast"
name="relaySetBroadcast"
placeholder="wss://nos.lol, wss://nostr.mom or leave blank to use your write relay list" />
</p>
</div>
</form>
</div>
<style>
.cool-field {
font-size: 16px;
padding: 5px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
.cool-field::placeholder {
color: #999;
}
</style>
<p>
<button
id="fetch-and-broadcast"
onclick="fetchAndBroadcast(); return false;">
Backup & Broadcast
</button>
<button
id="just-broadcast"
onclick="justBroadcast(fileName); return false;"
style="display: none">
Broadcast from File
</button>
<button
id="get-from-extension"
onclick="getFromExtension(); return false;"
style="display: none">
Get from extension
</button>
</p>
</div>
</form>
</div>
<div class="box">
<div class="box-content">
<p id="fetching-status"></p>
<p style="padding-top: 2px">
<progress
type="range"
id="fetching-progress"
name="fetching-progress"
min="0"
max="180"
value="0"
style="visibility: hidden" />
</p>
</div>
<div class="box-content" id="checking-relays-box">
<table id="checking-relays" class="fullwidth">
<tr id="checking-relays-header"></tr>
</table>
</div>
<div class="box-content">
<p id="file-download"></p>
<p id="events-found"></p>
</div>
<div class="box-content">
<p id="broadcasting-status"></p>
<p style="padding-top: 2px">
<progress
type="range"
id="broadcasting-progress"
name="broadcasting-progress"
min="0"
max="180"
value="0"
style="visibility: hidden" />
</p>
</div>
</div>
<footer>
<h5>
<p>Please note that our data export service is a best-effort service and not
a complete backup. While we do our best to ensure that all data is included
in the export, we cannot guarantee that all data will be exported."</p>
</h4>
</footer>
</main>
<script src="https://bundle.run/buffer@6.0.3"></script>
<script src="https://bundle.run/bech32@2.0.0"></script>
<script src="https://nostr-utils.pages.dev/js/jquery-3.6.2.min.js"></script>
<script src="js/nostr-utils.js"></script>
<script src="js/relays.js"></script>
<script src="js/nostr-broadcast.js"></script>
<script>
Date.prototype.toDateInputValue = (function() {
var local = new Date(this);
local.setMinutes(this.getMinutes() - this.getTimezoneOffset());
return local.toJSON().slice(0,10);
});
document.getElementById('endDate').value = new Date().toDateInputValue()
</script>
</body>
</html>