chatgpt-google-extension
chatgpt-google-extension copied to clipboard
add support for most search engines
related: #1 #8 #20 #21 #22 #24
Now support Google, Bing, Yahoo, DuckDuckGo, StartPage, Baidu, Kagi, Yandex, Naver, Brave, Searx, Ecosia Have a try here: https://github.com/josStorer/chat-gpt-search-engine-extension/releases
Preview:
related: #1 #8 #20 #21 #22 #24
Wow thanks, I'll take a look tomorrow
This is a review generated by ChatGPT 🤩:
This pull request appears to add support for multiple search engines to a browser extension that displays ChatGPT responses alongside search results. The extension currently only supports Google, but this pull request aims to add support for Bing, Yahoo, DuckDuckGo, StartPage, Baidu, Kagi, Yandex, Naver, Brave, Searx, and Ecosia.
One potential problem with this pull request is that it hardcodes the input element names for search boxes into the config
variable. This means that if any of the search engines supported by this extension change the name of their search box input elements, the extension will no longer be able to find them and will not be able to display ChatGPT responses alongside search results.
To fix this issue, I would suggest using a more flexible approach for identifying search box input elements. One way to do this would be to use the querySelectorAll
method to search for elements with the input
tag and the search
or query
attribute, rather than hardcoding specific input element names into the config
variable.
Another potential problem with this pull request is that it adds a large number of new configuration options to the config
variable, which makes the code difficult to read and understand. To improve readability and make it easier to maintain the code, I would suggest moving the configuration options for each search engine into a separate object. This would make it easier to add, remove, or modify the configuration options for individual search engines without having to scroll through a long list of options.
Overall, I think this pull request has the potential to add useful functionality to the extension, but it would benefit from some changes to improve its flexibility and readability.
@kxxt That's cool
@wong2 are you currently working on this PR? If not, I can do some updates tomorrow to make it more flexible and readable
@josStorer I'm not.
Please resolve conflicts
@wong2 resolved
Nice work, @josStorer!
@wong2 have updated and tested, it works fine
thanks, I'll merge after more tests tomorrow
I'll merge this and do some fixes myself.
大佬厉害