OpenGenus / quark

Stay happy while offline | World's first offline search engine.
https://chrome.google.com/webstore/detail/opengenus-offline-search/lfoloadpfjildomeafpdopahkdaoofbn
GNU General Public License v3.0
624 stars 113 forks source link

Default language #101

Open deeheem opened 6 years ago

deeheem commented 6 years ago

Fixes issue:

78

Changes:

A 'Set Default Language' option is added under the Setting icon which appears on the top right of the page as shown:

image

The modal shows a list of all extensions present, with their corresponding number of codes present in brackets. The list is saved in extensions/extensions.txt, which can easily be generated at the developers end by using a script or PowerShell commands.

The user can enable/disable the settings using the toggle switch on the top right of the model.

UI with disabled settings: image

After enabling, the user can set his/her default languages(s).

If the results for a topic don't contain any code from any of the user's default languages, then codes with all extensions present are shown. For example, if the user has set his default languages as .cpp and .py, and the topic 'Fuzzy Search' only has codes available in .js and .php, then these 2 codes are shown instead of showing blank.

Also, please note that the settings are applicable after the user refreshes the page.

AdiChat commented 6 years ago

This feature is not working as expected.

The issue as depicted from the console is Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/. This is related to the request to the extensions.txt file.

Kindly take a look into it. :+1: