diff --git a/README.md b/README.md index 62284f3..a4614a0 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,14 @@ > A no-database, no-backend pastebin-like service. All the data is stored in the url. -This is a rewrite of https://nopaste.boris.sh/, which was a rewrite of https://topaz.github.io/paste/. The biggest improvement of this version is that it uses brotli compression, while staying compatible with the original lzma compressed urls. +This is a rewrite of https://nopaste.boris.sh/, which is a rewrite of https://topaz.github.io/paste/ -[More information on this self-hosted "about" page](https://paste.scambier.xyz/?l=mrwn#G14EICwPbMc0BJ69xNPoItLoErDRMwMj3+vxE5RxArxajeByk+b0b1Tm2h/5ugGgK6S83AqUCi09HeYmDs+vvzQc0QDZe7v7U2rHnFe6CTWSm2AArNua4tqtXVIEFVQuqG+is15etOm1OZOPPCH4xDX1iDNF2bQcN9ugum0Icnwj51n0nlvNacn/N3OOctSGrQbLoNzG8n5bSoJQXOx+PsxV+MeUl+rkKNPIAXT9c8LoOY/772FiFkLv/5w8rvtCBc38VEE5lzmGFcZ0QtqlzBhvWLV5WPhRkROqeoKoDCtH03/fQVI5Y8HfLkq2/Nuidd1GQTKgmPJQVWbZ4cAiqUdOJG6j6pvu48qWjqamYG3nFPHcdYLHYCRV877U2mBgSHTbLWv6eu/DEA88SE5XEIqiQFyDVS2HLN7jJSloLHQJ+jOE86zb9jrkQ9tXAwkAoovCcnlrW5T/EU4L7imRsDAkZdEySO/ri/NBuHPMpSFnqGItLlPd98/SZSmySbImOLfv4WGbdCxw9TYykGsk56aQaVSa/DB2t5HfD6x28lJVlMm3Hjnkwyx95PxNGH0teCAk6CqtbBYlC3LjhY0IEpJ0WWZWY6MlJB+jEW7lAN3DSJD0QFz2FZOOV/HwA9LbFBU=) +[More information on this self-hosted "about" page](https://paste.scambier.xyz/?l=md#G0oEIKySx5UfTkdu1XoEsNFTBka+1+MnKOMEeLUaweWLc/oYlbttJz93QOgIkhdODeUmDs/+u3T5RANkM7+ktGLRxbTN0WIKyb2AWJbsnIoNDvzMtbcgQpsQYPWXPwUeRkuMWOXIEYIfzvnjqY85WNtT9Rjq3Y4/qHB1+mjzCQsTvr9UIfLbq28+i4joe5i/F2SQCTO9G/SlgnojZOKr9BSbIq0EPVBnVgg9T8+zls2Ezgg67tZTjX8pVB70RIghiwfFeqn/ZMQv9VGcbEWDIHnUlL52CL4FeCQ6DMJ4OOtVWk9jWI3i1CRvzxbmHudPlk1iA4pD9wHgOOILFPKQUAntulosi6VRhJ9eeSmViKpbloonQX9cDQVUkg8rzdkoBllTTfnVcYwDRsMS3UjTv/I+befAQeNMiRc7ESFegwUd6yEFPyVJG8RCXcgvw1QfdBe93uXQ9qGBL6BhLpjlpqxjmf9fwkKHFYClXmn7yaZrc/HrW6YH5F6Ei9MGKMvY5be++/noh6TJ5MeGgDzeJgNr0rjvcltZrDRS8wumbWpseMjTY1bz/rp/fJVQxwy/Rd+kXjlGrMJLZsVVwED5b0Jr26wUAm85shUyLX50kklq6ZIRfnzNX4LWrnl72vWR1YaTr/3n+Cp+6IBEliYA) ## TODO - [x] Use brotli -- [x] Stay compatible with original lzma-compressed urls +- [x] ~~Stay compatible with original lzma-compressed urls~~ - [x] Have a read-only view with nice colors for code blocks - [ ] Use CodeMirror 6 - [ ] 100% self-contained, no dependance on jsdeliver diff --git a/src/app.html b/src/app.html index c241b90..68ea521 100644 --- a/src/app.html +++ b/src/app.html @@ -14,8 +14,6 @@ npm/codemirror@5.65.16/theme/nord.min.css" /> %sveltekit.head% - -
%sveltekit.body%
diff --git a/src/components/TopBar.svelte b/src/components/TopBar.svelte index ea94954..c8ce1e6 100644 --- a/src/components/TopBar.svelte +++ b/src/components/TopBar.svelte @@ -5,7 +5,7 @@

Paste

About diff --git a/src/globals.d.ts b/src/globals.d.ts index d670a24..32f30df 100644 --- a/src/globals.d.ts +++ b/src/globals.d.ts @@ -1,7 +1 @@ -declare class LZMA { - constructor(any): {} - compress: (value: string, level: number, callback: (result: number[]) => void) => void - decompress: (b: Uint8Array, callback: (result: string, err: any) => void) => void -} - declare const CodeMirror: any diff --git a/src/lib/lzma.ts b/src/lib/lzma.ts deleted file mode 100644 index 5d02ce6..0000000 --- a/src/lib/lzma.ts +++ /dev/null @@ -1,33 +0,0 @@ -// LZMA imported from
- - - - - -
- {#if isMarkdown} - {@html decompressed} - {:else if isPlainText} -
- {decompressed} -
- {:else} -
{@html decompressed}
- {/if} -
+ {#if decompressed} + + + + + +
+ {#if isMarkdown} + {@html decompressed} + {:else if isPlainText} +
+ {decompressed} +
+ {:else} +
{@html decompressed}
+ {/if} +
+ {/if}