mirror of
https://github.com/Ellpeck/ObsidianJustSharePlease.git
synced 2024-11-23 02:48:34 +01:00
some better branding
This commit is contained in:
parent
49b871c1df
commit
1d83851102
5 changed files with 22 additions and 21 deletions
|
@ -1,2 +1,7 @@
|
|||
# ObsidianJustSharePlease
|
||||
A simple Obsidian plugin that allows sharing a note using a random link. For more information, see the official site at [jsp.ellpeck.de](https://jsp.ellpeck.de).
|
||||
# Just Share Please for Obsidian
|
||||
|
||||
Just Share Please is an [Obsidian](https://obsidian.md) plugin that allows quickly and easily sharing individual notes online using an anonymized link.
|
||||
|
||||
For more information, see the official site at [jsp.ellpeck.de](https://jsp.ellpeck.de).
|
||||
|
||||
![A preview showing off a shared note in Just Share Please](preview.png)
|
||||
|
|
BIN
preview.png
Normal file
BIN
preview.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 185 KiB |
|
@ -1,7 +1,10 @@
|
|||
# Just Share Please
|
||||
Just Share Please is an [Obsidian](https://obsidian.md) plugin that allows quickly and easily sharing individual notes online using an anonymized link.
|
||||
|
||||
Just Share Please is an [Obsidian](https://obsidian.md) plugin that allows quickly and easily sharing individual notes online using an anonymized link. It's pretty cool!
|
||||
![A preview showing off a shared note in Just Share Please](https://raw.githubusercontent.com/Ellpeck/ObsidianJustSharePlease/main/preview.png)
|
||||
|
||||
## About this Site
|
||||
WIP
|
||||
|
||||
## Self-Hosting
|
||||
WIP
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"url": "http://localhost:8080",
|
||||
"url": "https://jsp.ellpeck.de",
|
||||
"shared": [
|
||||
{
|
||||
"id": "de56fe78",
|
||||
"password": "2d276f4d3c0715be08ad1812faa97deb",
|
||||
"id": "3d0c1531",
|
||||
"password": "aecfb2647cc647b0e047673a670e68be",
|
||||
"path": "Cool Test Note.md"
|
||||
}
|
||||
],
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
---
|
||||
test: yes
|
||||
---
|
||||
|
||||
yo
|
||||
# Cool Test Note
|
||||
|
||||
This is a cool test note, my friends!
|
||||
|
@ -12,23 +10,18 @@ This is a cool test note, my friends!
|
|||
```js
|
||||
$.ajax({
|
||||
method: "get",
|
||||
url: `share.php?id=${hash}`,
|
||||
url: id ? `share.php?id=${id}` : "index.md",
|
||||
success: t => {
|
||||
marked.use(markedKatex());
|
||||
marked.use(markedHighlight.markedHighlight({
|
||||
langPrefix: "hljs language-",
|
||||
highlight: (c, l) => {
|
||||
const language = hljs.getLanguage(l) ? l : "plaintext";
|
||||
return hljs.highlight(c, {language}).value;
|
||||
}
|
||||
}));
|
||||
main.html(DOMPurify.sanitize(marked.parse(t)));
|
||||
main.html(DOMPurify.sanitize(md.render(t)));
|
||||
|
||||
// scroll to anchor
|
||||
let element = $(window.location.hash);
|
||||
if (element.length)
|
||||
$(window).scrollTop(element.offset().top);
|
||||
},
|
||||
// TODO display this error more nicely
|
||||
error: (r, s, e) => main.html(e)
|
||||
error: (r, s, e) => main.html(`<div class="error"><p>Error loading shared note with id <code>${id}</code>: ${e}</p><p><a href="#">Home</a></p></div>`)
|
||||
});
|
||||
```
|
||||
http://localhost:8080#ff3ebb34
|
||||
|
||||
cool!!
|
||||
|
||||
|
|
Loading…
Reference in a new issue