Open ludos1978 opened 4 months ago
There is a context menu item available for this. Right click anywhere on the page and you should see "ArchiveBox Exporter" > "Archive Current Page" in the list.
One can also right-click on the menubar icon.
I do wish there were a button on the pop-up window for Archive current page
. Also a keyboard shortcut would be nice
Both are good ideas, I think both are fairly easy to add with a couple handler funcs and one-line changes to manifest.json
. If anyone wants to contribute this I think it can be done by copy pasting in the source code and asking ChatGPT what changes to make. PRs welcome :)
Oh I could try this for keyboard shortcut: https://github.com/ArchiveBox/ArchiveBox/discussions/1248
I wouldn't do it that way, there is a keyboard shortcuts API built into extensions already, it's very simple and just requires one line in manifest.json defining the default key combo + a handler function to call when it's pressed.
The benefit of using the native API is chrome provides the UI to change the default key combo to something else.
I wrote:
One can also right-click on the menubar icon.
Actually, that method doesn't work for some reason. No matter, most people won't know about this "Archive Current Page" path anyway.
@ pirate wrote:
I wouldn't do it that way, there is a keyboard shortcuts API built into extensions already
Yeah for sure. I just meant for myself until it's supported in the extension. If I have some time I'll try to do a PR for the extension.
I must have been very unclear in my description. I do think it would be way better to have the "archive current page" on the left click, instead of having it on the right click.
Currently a left click leads to a window that gives advances settings and options but not the most important basic functions.
My suggestion was to add a Button "Archive current page" to the window that opens on the left click.
@ludos1978 You were very clear. It's me who confused you with my right-click suggestion (which I later retracted). We're all on the same page: we want to be able to quickly add the current page with a left-click on the icon.
A good inspiration might be the wayback-machine browser plugin.
Not sure which features are required, but a big button on top would be a great solution :-)
Actually, that method doesn't work for some reason. No matter, most people won't know about this "Archive Current Page" path anyway.
Because the pageUrl is not available to toolbar context menu entries. This entry should not be displayed on 'all' context menus. (IMO it shouldn't be displayed in any context menus, I don't really want even more context menu entries overflowing the screen when I right click on a page, although that's Chrome's fault)
https://stackoverflow.com/a/14251218/2283305
(Also the context menu, even right clicking on the page, also doesn't work in some cases like when you're looking at a PDF in Chrome's built-in viewer)
Something like https://github.com/Steering7253/archivebox-browser-extension/commit/793c0a225cbe0c7ab16f9ad6a575ba5627cc7a05
(BTW package.json is malformed)
From my usage experience (a week), i mostly want to archive a page i currently have open. Up till now i never used the url-regex system.
So my suggestion is to add the buttons to archive the current page, to the default window.