Compare commits

..

3 commits

Author SHA1 Message Date
a033ab15db version bump 2021-06-23 01:35:25 +02:00
0f5fa02fc5 Added back ToClipboard 2021-06-23 01:35:00 +02:00
4de45c1672 Format string to browser locale 2021-06-22 23:57:55 +02:00
2 changed files with 12 additions and 2 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "jeff-downloader2", "name": "jeff-downloader2",
"version": "0.3.2", "version": "0.3.3",
"private": true, "private": true,
"scripts": { "scripts": {
"start": "node ./bin/www" "start": "node ./bin/www"

View file

@ -143,7 +143,7 @@ Come take a look here https://git.namejeff.xyz/Supositware/jeff-downloader for a
<div class="control"> <div class="control">
<div class="tags has-addons"> <div class="tags has-addons">
<span class="tag">Download date</span> <span class="tag">Download date</span>
<span class="tag is-primary"><%= file.date %></span> <span class="tag is-primary"><%= file.date.toLocaleString() %></span>
</div> </div>
</div> </div>
</div> </div>
@ -274,6 +274,16 @@ Come take a look here https://git.namejeff.xyz/Supositware/jeff-downloader for a
}); });
} }
function toClipboard(text) {
if (navigator.clipboard)
navigator.clipboard.writeText(text)
.catch(err => {
console.error(err);
});
else
console.error('Could not access the clipboard.');
}
function uuidv4() { function uuidv4() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);