📜 ⬆️ ⬇️

HabraCorrector for Opera and not only

Habraprive all

Often in different topics you can find comments about errors that, after correcting errors, look at least ridiculous. Why users do not write in a personal author? The answer suggests itself - on Habré a convenient system of notifying the authors about errors has not been created. A little googling, I found attempts to create such a system, for example:

habrahabr.ru/blogs/google_chrome/115852
habrahabr.ru/blogs/habrahabr_ideas/115012
')
Both versions are written under Google Chrome, and the author seems to want to make a cross-browser version, but this never happened. I myself prefer Opera, so these options did not suit me. But I remembered the saying “If you want to do something well, do it yourself ...”. No sooner said than done. In my free time I figured out how to build extensions for Opera and I created a small extension. I’ll say right away that it actually consists of one UserJS script, so it will probably work on browsers other than Opera, but I’m not sure about that ... Anyone interested is asking for a cat.

HabraCorrector

So, the extension itself is called HabraCorrector. You can download the official list of extensions. The code is open on Github . The extension works on a simple principle, already familiar to everyone, select the text with an error, press Ctrl + Enter. Extending window comes out. With the design, I decided not to bother, but put the jQuery UI dialog. It looks like this:



After clicking on the Submit button, a notification should be sent that the submission was successful, and the author of the topic will receive a personal message describing the error. Nothing complicated!

Browser support

In fact, the extension consists of a single UserJS script, which is located in the includes folder (look at the code on Github), hence Firefox support is theoretically possible and not only, but in reality I could not get it using FF (the problem is most likely in jQuery). If someone worked with UserJS in FF, I will not refuse help :)

PS Thank you for your attention! If this topic finds support among users, I promise to develop the extension and, possibly, make it cross-browser.

PPS If such an extension for Opera is already implemented - I apologize, but the alternative in any case does not hurt.

PPPS Thanks to the Ocelot user for finding a bug (inability to enter the correct error correction). The bug has already been resolved and a new version has been sent for moderation to the Opera extensions center. As soon as the extension passes moderation, you will receive a corrected version.

UPD: Update accepted by moderators. The new version 1.1 is fully functional, no bugs are observed.

Source: https://habr.com/ru/post/136279/


All Articles