Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a browser bookmarklet for quick-adding recipes #431

Open
paulburton0 opened this issue Dec 11, 2020 · 5 comments
Open

Create a browser bookmarklet for quick-adding recipes #431

paulburton0 opened this issue Dec 11, 2020 · 5 comments
Labels
enhancement New feature or request Frontend Issue or PR related to the frontend code javascript Pull requests that update Javascript code

Comments

@paulburton0
Copy link

A bookmarklet would make saving recipes to Cookbook easy without the "heavyweight" development overhead of creating a full-blown API or a browser extension.

@christianlupus
Copy link
Collaborator

You mean as an alternative to #288?
The overhaul is necessary for quick development anyway. Also, there is the issue that the bookmarklet runs in the context of the owning site so has no login credentials to NC as far as I understand your suggestion.

So please be a bit more specific, what this issue is about. Is it a suggestion? Is it a question if you can open a PR 😄?

@paulburton0
Copy link
Author

I'm not a coder per se, so I guess this is a suggestion/feature request.

I don't mean that a browser bookmarklet would replace the suggested "batch add" functionality in. Rather, it would streamline the saving of a recipe.

Perhaps a use-case scenario would help: If I'm browsing, say NY Times recipes and I see one I want to add to my NC Cookbook, while I'm on that recipe page, I click the bookmarklet (saved conveniently to my browser's bookmarks toolbar) and it's added without having to copy the URL, open a new tab, go to Cookbook, paste the URL, and click the button to save it to Cookbook.

Again, I'm not up on all of the security/architectural implications of this, but I do know that the Nextcloud Bookmarks app has a bookmarklet that works similar to my scenario above (i.e. when you're on a page that you want to save to your Nextcloud bookmarks app, you execute the bookmarklet while on that page and it "just does it").

@geeseven
Copy link
Contributor

geeseven commented Dec 12, 2020

It has been many years since I have used bookmarklets. At the time, I found them super useful.

As @paulburton0 mentioned, the Bookmark app has a bookmarklet. F̶o̶r̶ ̶s̶o̶m̶e̶ ̶r̶e̶a̶s̶o̶n̶,̶ ̶I̶ ̶c̶a̶n̶'̶t̶ ̶s̶e̶e̶m̶ ̶t̶o̶ ̶a̶d̶d̶ ̶i̶t̶ ̶t̶o̶ ̶a̶n̶y̶ ̶b̶r̶o̶w̶s̶e̶r̶.̶ This bookmarklet creates a add bookmark page popup that has some fields prepopulated. I wonder if the popup approach could be used with the 'Recipe URL' field prepopulated. 🤔

@Bugsbane
Copy link
Member

Bugsbane commented Oct 5, 2021

the bookmarklet runs in the context of the owning site so has no login credentials to NC

The News app used to have a bookmarklet which was generated in its settings area. The user dragged it to their bookmarks toolbar, and then clicking on it would add the URL to the News app itself. The exact same thing would be amazing (you could even almost straight steal the code!) just putting the URL into the Cookbook app instead.

From memory, the way it dealt with the security side was that you had to currently be logged in to Nextcloud using that browser for it to work.

@christianlupus christianlupus added enhancement New feature or request Frontend Issue or PR related to the frontend code javascript Pull requests that update Javascript code labels Jan 18, 2022
@christianlupus
Copy link
Collaborator

You are right and I see another benefit for this: Pages loading parts of their content in a lazy fashion could be parsed better. We would let the client browser do the loading and heavy lifting and just parse the DOM and forward the result to the cookbook app. So, this is for sure on the task list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Frontend Issue or PR related to the frontend code javascript Pull requests that update Javascript code
Projects
None yet
Development

No branches or pull requests

4 participants