[GH-ISSUE #84] Feature request : Add a bookmarklet to add a page to shiori directly by cliking on a bookmarklet on a given page. #59

Closed
opened 2026-02-25 23:33:21 +03:00 by kerem · 9 comments
Owner

Originally created by @gissehel on GitHub (Apr 9, 2018).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/84

Add a bookmarklet to add a page to shiori directly by cliking on a bookmarklet on a given page.

Expected usage

  • On the shiori main page, there would be a link named "Add" or "Add to shiori" that would link to an addresse like javascript:(function(){...})()
  • By drag & dropping the link the bookmark bar, the user would "install" the bookmarklet
  • When browsing a web site (eg: www.google.com), the user would click on the link "Add to shiori" that would then execute the javascript contained in the link.
  • The javascript would then insert the current page into the shiori server, using the currently logged user, with no title and no tag (or with a #to_sort tag)
Originally created by @gissehel on GitHub (Apr 9, 2018). Original GitHub issue: https://github.com/go-shiori/shiori/issues/84 Add a bookmarklet to add a page to shiori directly by cliking on a bookmarklet on a given page. Expected usage ========== * On the shiori main page, there would be a link named "Add" or "Add to shiori" that would link to an addresse like `javascript:(function(){...})()` * By drag & dropping the link the bookmark bar, the user would "install" the bookmarklet * When browsing a web site (eg: www.google.com), the user would click on the link "Add to shiori" that would then execute the javascript contained in the link. * The javascript would then insert the current page into the shiori server, using the currently logged user, with no title and no tag (or with a #to_sort tag)
kerem closed this issue 2026-02-25 23:33:21 +03:00
Author
Owner

@RadhiFadlillah commented on GitHub (Jun 5, 2018):

Hi guys, sorry for late response.

I've made a simple bookmarklet for shiori that works by sending POST request to $SHIORI/api/bookmarks through XMLHttpRequest. The problem is this only works if $SHIORI is HTTPs, because the modern web browser now blocks all active mixed content.

Now, since shiori is self hosted, not all user can serve it behind HTTPs. To solve it, as the fallback when $SHIORI is not HTTPs, I'm planning to make the bookmarklet redirects user to submit page $SHIORI/submit?url=... (just like Reddit's submit page).

If all goes well this feature should be committed on these following days.

<!-- gh-comment-id:394640164 --> @RadhiFadlillah commented on GitHub (Jun 5, 2018): Hi guys, sorry for late response. I've made a simple bookmarklet for `shiori` that works by sending POST request to `$SHIORI/api/bookmarks` through `XMLHttpRequest`. The problem is this only works if `$SHIORI` is HTTPs, because the modern web browser now blocks all [active mixed content](https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content). Now, since `shiori` is self hosted, not all user can serve it behind HTTPs. To solve it, as the fallback when `$SHIORI` is not HTTPs, I'm planning to make the bookmarklet redirects user to submit page `$SHIORI/submit?url=...` (just like [Reddit's submit page](https://www.reddit.com/submit)). If all goes well this feature should be committed on these following days.
Author
Owner

@5hay commented on GitHub (Jun 5, 2018):

Since you can get a SSL certificate pretty easily and for free through LetsEncrypt, you could maybe integrate auto certificate renewal.

https://godoc.org/golang.org/x/crypto/acme/autocert as a reference.

I think most shiori instances are available over the internet, that's why I would definitely recommend a SSL certificate.

<!-- gh-comment-id:394675027 --> @5hay commented on GitHub (Jun 5, 2018): Since you can get a SSL certificate pretty easily and for free through LetsEncrypt, you could maybe integrate auto certificate renewal. https://godoc.org/golang.org/x/crypto/acme/autocert as a reference. I think most shiori instances are available over the internet, that's why I would definitely recommend a SSL certificate.
Author
Owner

@RadhiFadlillah commented on GitHub (Jun 6, 2018):

I've added bookmarklet in commit 4b93937. To use it, just drag the Add new bookmark button to your bookmark toolbar :

Screencast

When possible (i.e. allowed by CSP), the bookmarklet will show dialog for saving new bookmark :

As dialog

However, if it's not possible, the bookmarklet will redirect you to submit page :

As submit page

Please try it out.


Since you can get a SSL certificate pretty easily and for free through LetsEncrypt, you could maybe integrate auto certificate renewal...

I don't think I will do it, because :

  • It adds new complexity to shiori. Right now I just want to focus on making shiori stable and reliable enough to use.
  • When user self hosted shiori, they usually put it behind a web server anyway, and there are already many good web server that can fetch SSL certificate from Let'sEncrypt, e.g Caddy and nginx.
<!-- gh-comment-id:395104974 --> @RadhiFadlillah commented on GitHub (Jun 6, 2018): I've added bookmarklet in commit [`4b93937`](https://github.com/RadhiFadlillah/shiori/commit/4b939379e83b34f6d9d97517a80b8dd44313bbe8). To use it, just drag the `Add new bookmark` button to your bookmark toolbar : ![Screencast](https://user-images.githubusercontent.com/6129042/41046069-e255a74e-69d3-11e8-9723-8fe0f811e168.gif) When possible (i.e. allowed by CSP), the bookmarklet will show dialog for saving new bookmark : ![As dialog](https://user-images.githubusercontent.com/6129042/41046287-5c5a5774-69d4-11e8-8459-bf7a71297e47.png) However, if it's not possible, the bookmarklet will redirect you to submit page : ![As submit page](https://user-images.githubusercontent.com/6129042/41046461-a60c8ac2-69d4-11e8-84af-245a070180f1.png) Please try it out. --- > Since you can get a SSL certificate pretty easily and for free through LetsEncrypt, you could maybe integrate auto certificate renewal... I don't think I will do it, because : - It adds new complexity to `shiori`. Right now I just want to focus on making shiori stable and reliable enough to use. - When user self hosted `shiori`, they usually put it behind a web server anyway, and there are already many good web server that can fetch SSL certificate from Let'sEncrypt, e.g Caddy and nginx.
Author
Owner

@5hay commented on GitHub (Jun 6, 2018):

Works pretty nice, running behind a Nginx reverse proxy on my Raspberry Pi via Docker. Thank you!

<!-- gh-comment-id:395155567 --> @5hay commented on GitHub (Jun 6, 2018): Works pretty nice, running behind a Nginx reverse proxy on my Raspberry Pi via Docker. Thank you!
Author
Owner

@gissehel commented on GitHub (Jun 16, 2018):

As it works fine, I'll close the issue.

<!-- gh-comment-id:397797776 --> @gissehel commented on GitHub (Jun 16, 2018): As it works fine, I'll close the issue.
Author
Owner

@imjoeyli commented on GitHub (Nov 24, 2019):

It doesn't work now? The add button can't drag and drop.

<!-- gh-comment-id:557910134 --> @imjoeyli commented on GitHub (Nov 24, 2019): It doesn't work now? The add button can't drag and drop.
Author
Owner

@jajpater commented on GitHub (May 27, 2020):

Doesn't work here either

<!-- gh-comment-id:634574208 --> @jajpater commented on GitHub (May 27, 2020): Doesn't work here either
Author
Owner

@8bitgentleman commented on GitHub (May 27, 2020):

The bookmarklet has been depreciated and the official method is now the web extension

<!-- gh-comment-id:634815742 --> @8bitgentleman commented on GitHub (May 27, 2020): The bookmarklet has been depreciated and the official method is now the [web extension](https://github.com/go-shiori/shiori-web-ext)
Author
Owner

@jajpater commented on GitHub (May 28, 2020):

@8bitgentleman I know, but that didn't work for me either see this issue

<!-- gh-comment-id:635158969 --> @jajpater commented on GitHub (May 28, 2020): @8bitgentleman I know, but that didn't work for me either [see this issue](https://github.com/go-shiori/shiori-web-ext/issues/18)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#59
No description provided.