NITDgpOS / Fearch

This is a chrome extension where we can search music,video and books over ftp servers. You can add it to your chrome using this link -
https://chrome.google.com/webstore/search/fearch
MIT License
37 stars 37 forks source link

Google script now only gets injected in tabs opened by this extension. #57

Closed srajanpaliwal closed 7 years ago

srajanpaliwal commented 7 years ago
- added googleFearch.css to hide search bar.
- replaced googleScript with googleFearch.js.
    - both files are loaded at the start of document.
    - added a long list to support all google domains.

I have hardcoded a random string to identify tabs created by the extension. But, this can be changed in the future.

PaliwalSparsh commented 7 years ago

@srajanpaliwal Thanks for the PR 😄

  1. I was searching stackoverflow for something and found this a while back, about a limit on the no. of match patterns. http://stackoverflow.com/questions/23747781/match-pattern-for-all-google-search-pages#comment-36583130

  2. Also on google search query page the css worked but the js part in googleFearch.js didn't work for me and worked only when I had set "run_at": "document_end"

  3. Also please can you explain the reason for uuid here https://github.com/NIT-dgp/chrome-search-extension/pull/57/files#diff-d8c11c63dfd474a75f05fbbdba0889f8R63 . Does this not affect query in some way.

But the lag that came earlier in the injected script loading and being applied has certainly diminished.

srajanpaliwal commented 7 years ago
  1. I was searching stackoverflow for something and found this a while back, about a limit on the no. of match patterns. http://stackoverflow.com/questions/23747781/match-pattern-for-all-google-search-pages#comment-36583130

The comment does not have a source. And i think it will not be such a small number, even if there is a limit. I tried a few domains from end of the list it works fine. We should test it just to be sure. :D

  1. Also on google search query page the css worked but the js part in googleFearch.js didn't work for me and worked only when I had set "run_at": "document_end"

The injected css and script should works fine in either case. Not sure why it is not working for you with "document_start"

  1. Also please can you explain the reason for uuid here https://github.com/NIT-dgp/chrome-search-extension/pull/57/files#diff-d8c11c63dfd474a75f05fbbdba0889f8R63 . Does this not affect query in some way.

"-" in a google query means search results should not contain this keyword. As it a long random string, it will not affect the query. I did this because match patterns ignores "#someString", while matching urls.

PaliwalSparsh commented 7 years ago

Merged manually after pulling thankyou for the PR. Keep up the good work.