dteviot / DriveByEditor

A simple Extension for Chrome that allows you to mark up proof reading corrections on a web page.
GNU General Public License v3.0
2 stars 1 forks source link

chrome usage in context menu handler #3

Closed Querela closed 6 years ago

Querela commented 6 years ago

See in File plugin/background.js , line 20. Above you use shim to abstract usage oft Firefox/chrome but when adding the context menues you don't. I've not tested it but it may be an error?

dteviot commented 6 years ago

@Querela Thank you very much for the feedback. I'm always delighted when someone takes the effort to read the code I've written and check it for bugs.

See in File plugin/background.js , line 20.

Ah. This. https://github.com/dteviot/DriveByEditor/blob/0cad1474f74a3fe659bdd6ae035cfef5cf43c44c/plugin/background.js#L19-L25 (Note, you can link to the actual code, See: https://stackoverflow.com/questions/23821235/how-to-link-to-specific-line-number-on-github)

I've not tested it but it may be an error?

It's not an error. In this particular case, a shim is not necessary, as the chrome object in Firefox has a contextMenus object. https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/contextMenus There's also one in the browser object, (https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/contextMenus/create) but if I use the chrome one, I don't have to shim that code.

dteviot commented 6 years ago

Not a bug

Querela commented 6 years ago

Hi, your project seemed interesting and shows a lot oft possibilities for further extension and usage. :-) I often wanted to correct / report some mistakes in novels but there was no really easy way (with context/position/type of change) ...

I tried linking the line but it wouldn't work in my mobile phone ... And the code seemed well thought through, so I guess I should habe better researched before I opened an issue. But ... it seemed wierd when twice a check happens but then there is this single line where it hasn't. You probably have tested it well enough before.

Thanks for your good reception and extensive answer.

PS.: found your project via reddit (RSS post)