ssborbis / ContextSearch-web-ext

Search engine manager for modern browsers
321 stars 36 forks source link

[Suggestion] Introduce an option to disable logs to Browser Console #608

Open Fanolian opened 1 year ago

Fanolian commented 1 year ago

This is not a complaint about privacy. I just don't want ContextSearch to flood my console. The extension prints logs into browser console for every mouse click. I searched for log in ContextSearch Options, even in Advanced, but couldn't find an option to disable it. It would be great if I can hide the logs when the extension is working fine, which is most of the time.

Steps to reproduce

  1. Install ContextSearch in a new profile in Firefox 107 or Nightly. Keep settings as default.
  2. Open Browser Console (Ctrl-Shift-J). Switch to Multiprocess (Slower) mode.
  3. Make sure Logs is enabled.
  4. Left/Right click anywhere in a page the extension is activated, e.g. this report page.

Actual result

Every click creates a line of log.

14:04:05.090 126 https://github.com/ssborbis/ContextSearch-web-ext/issues/new closeQuickMenuRequest [background.js:119:11](moz-extension://[UUID]/background.js)
14:04:05.357 126 https://github.com/ssborbis/ContextSearch-web-ext/issues/new updateSearchTerms [background.js:119:11](moz-extension://[UUID]/background.js)
14:04:05.358 126 https://github.com/ssborbis/ContextSearch-web-ext/issues/new updateContextMenu [background.js:119:11](moz-extension://[UUID]/background.js)
14:04:05.385 126 https://github.com/ssborbis/ContextSearch-web-ext/issues/new updateQuickMenuObject [background.js:119:11](moz-extension://[UUID]/background.js)
14:04:05.721 126 https://github.com/ssborbis/ContextSearch-web-ext/issues/new closeQuickMenuRequest [background.js:119:11](moz-extension://[UUID]/background.js)
14:04:06.158 126 https://github.com/ssborbis/ContextSearch-web-ext/issues/new updateSearchTerms [background.js:119:11](moz-extension://[UUID]/background.js)
14:04:06.159 126 https://github.com/ssborbis/ContextSearch-web-ext/issues/new updateContextMenu [background.js:119:11](moz-extension://[UUID]/background.js)
14:04:06.184 126 https://github.com/ssborbis/ContextSearch-web-ext/issues/new updateQuickMenuObject [background.js:119:11](moz-extension://[UUID]/background.js)

Notes

This is not a recent regression. I can reproduce it in 1.42 and didn't try earlier versions.

Thank you for your extension.

Fanolian commented 1 year ago

There are 4 logs from a single left click; 42 from double clicking a word > click a search engine from Quick Menu.

ssborbis commented 1 year ago

I can move those logs to a debug function. I didn't realize they were spamming the global console.

ssborbis commented 1 year ago

This should be greatly reduced in 1.46.6 going up now.

The next major release will be more thorough