Coder Social home page Coder Social logo

Comments (3)

giuse94 avatar giuse94 commented on August 27, 2024

Unfortunately, if the default suggestion is turned off, it is replaced by the name of the extension, so we don't gain any advantage.

from treccanisearch.

giuse94 avatar giuse94 commented on August 27, 2024

Since there's always a default suggestion, we can simplify these lines:

// Up to six suggestions only are shown in the address bar, including the
// default suggestion (if set).
const MaxNumberOfSuggestions = 6;
// We subtract 1 since the default suggestion is set.
let numberOfSuggestionsToShow = Math.min(MaxNumberOfSuggestions - 1, json.length);

Just replace 6 with5 and remove - 1 (along with the comment above).

from treccanisearch.

giuse94 avatar giuse94 commented on August 27, 2024

Unfortunately, if the default suggestion is turned off, it is replaced by the name of the extension, so we don't gain any advantage.

However, the default suggestion can be updated at any time, so we could replace its content (the random hint) with the first suggestion retrieved from the server. I'll give it a try.

from treccanisearch.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.