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

Redesign fixes #34

Merged
merged 3 commits into from
Dec 15, 2024
Merged

Redesign fixes #34

merged 3 commits into from
Dec 15, 2024

Conversation

benmuth
Copy link
Contributor

@benmuth benmuth commented Dec 13, 2024

These changes (along with a small bug fix in the main ArchiveBox repo) let the extension successfully make a request to a running ArchiveBox server.

This was tested with v0.8.5rc51

The request to the REST API is made from the background script, instead of the popup script, to avoid having to deal with CORS issues.

I'm not doing anything with the response from the fetch request for now, but we could probably have an indicator that updates to show that the snapshot was successful.

It seems like the content_scripts section of the manifest.json was superfluous, and led to errors loading the extension for me, so I removed it.

Also fix closing popup when pressing escape.
Also cleaned up now unused code from popup.js.
Comment on lines 39 to 40
url: archivebox_server_url,
apiKey: archivebox_api_key,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
url: archivebox_server_url,
apiKey: archivebox_api_key,

Delete these lines too above:

- const { archivebox_server_url, archivebox_api_key } = await chrome.storage.local.get([
-    'archivebox_server_url',
-    'archivebox_api_key'
-  ]);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to delete the dead code above here.

@pirate pirate merged commit b2fb2e9 into ArchiveBox:redesign Dec 15, 2024
1 check passed
@pirate
Copy link
Member

pirate commented Dec 15, 2024

LGTM. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants