This repository hosts the source code of the "Ricerca su Treccani" Firefox extension, which lets you search the Treccani online corpus directly from the browser address bar.
When I installed the extension it worked very well, now it hasn't worked as before for a few months.
In essence, when typing the word, the Treccani list of synonyms, dictionary, etc. no longer appears.... only an element appears which refers to a Treccani page where you can choose whether you want to view the vocabulary, the synonyms or the encyclopedia of that word
Treccani recently switched from http to https as the protocol used to serve its contents. This prevents the extension from receiving responses from the server, because the extension is allowed to receive responses from http://www.treccani.it/ only.
Fortunately, the solution is simple: just add an "s" right after http in the following lines of code:
We could implement an ad-block to remove ads from Treccani website and reduce the number of unnecessary web requests to third-party domains. This will result in cleaner web pages and faster load times.
This feature will be active by default, but there will be an option to turn it on/off.
it reminds you how to use the extension, but only after you activated it by typing the key word;
it is not clear what happens when you click on the default suggestion, and it is not documented in the extension description on AMO: if the user did not enter any search term, then it opens the current hint, otherwise it opens the search page for that term. This is somewhat confusing;
extensions can only show up to six suggestions in the address bar, including the default one: turning it off would give users one more suggestion.
For these reasons we should add an option to hide the default suggestion.
When there's no Internet connection, the extension of course can't fetch data from the server and suggestions do not appear in the address bar. If the user is unaware of the problem, he might think that the extension is not working. We could then show a message in the address bar asking to check for Internet connection.
Apart from that, this code throws an exception which should be handled:
When the option "Always open search results in a new tab" is set, that tab is opened in background. Add an option to open new tabs in foreground.
Note: in general, when you open an address bar suggestion (not created by the extension) in a new tab, the tab is given focus by the browser; the extension's suggestions are opened in a new background tab instead. Therefore, the extension should follow the browser behaviour to maintain a consistent user experience.
So we have two tasks:
change current behaviour so that new tabs are opened in foreground;