Skip to content
This repository was archived by the owner on Apr 13, 2023. It is now read-only.

Adding support for StartPage.com #21

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

Bazoogle
Copy link

@Bazoogle Bazoogle commented Apr 1, 2023

I like this, but it does not offer support for startpage.com, my primary search engine preference. I added working functionality to this in tampermonkey, so I took those changes and applied them here as well. This will need testing, as I have not tested these changes in git hub, but I have tested the changes in tampermonkey. You can see the tampermonkey file that I am using here:
ChatGPT Search.user.txt

I also added a general error message for any status that isn't 200 so you know it responded with an error code, instead of thinking it's taking a while to respond. That was an issue I ran into.

The only change I did not apply to the git hub version that I did do in the tampermonkey version is I removed the extra spaces at the beginning of the answer. It added 2 \n at the beginning and it did not look good, so I removed them.

Added container injection for the search engine startpage.com
Startpage.com search query does not always have the search in the URL parameter. The next best option is to get the value from the search element.
Also added an error for any status that isn't 200, to show it was not working. I was having issues because it told me it was waiting for ChatGPT to answer, but it had already thrown an error. This at least shows that something is wrong.
Needs translating
moved the general status error to before the other errors, so if there was an accounted for error it would overwrite the general error. This could definitely be arranged better with some if else statements
Copy link
Author

@Bazoogle Bazoogle left a comment

Choose a reason for hiding this comment

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

Would actually want to adjust the event status !== 200. You could have it be the first error checked, and any accounted for error would overwrite the message. You could also just arrange it in an if/else statement

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

Successfully merging this pull request may close these issues.

1 participant