diff --git a/src/templates/index.html b/src/templates/index.html index 1c020bf..2ded9b2 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -1,77 +1,58 @@ - - - {host} - no bs pastebin - - + - - -
{body}
- - + const responses = await Promise.all([...event.clipboardData.items] + .filter(item => item.kind === 'file') + .map(async item => {{ + const file = item.getAsFile(); + if (!file) + return `Error reading from clipboard`; + return await upload(file, file.name) + }}) + ); + preElement.innerHTML = responses.join('\n'); + }}); + // Replace urls with links on page load + document.addEventListener('DOMContentLoaded', () => {{ + const preElement = document.querySelector('pre'); + preElement.innerHTML = preElement.innerHTML.replace(/((https:)[^\s]+[\w])/g, '$1'); + }}, false); + + +
{body}
diff --git a/src/templates/privacy.html b/src/templates/privacy.html index 8cdad7d..e1de881 100644 --- a/src/templates/privacy.html +++ b/src/templates/privacy.html @@ -1,23 +1,16 @@ - - - {host} - privacy policy - - - - - -
{body}
- - + + {host} - privacy policy + + + + +
{body}