File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -75,5 +75,21 @@ chrome.omnibox.onInputChanged.addListener(
7575    // TODO: Provide user the option to choose which of the following two options will be used to provide suggestions. 
7676    // TODO: Use StackOverflow api to get list of questions and sort them based on relevance. 
7777    // TODO: Use filters provided by user to show suggestions 
78+ 
79+     chrome . storage . sync . get ( { 
80+       questionsWithCodeFilter : false , 
81+       communityWikisFilter : false , 
82+       excludeDuplicateQuestionsFilter : false , 
83+       answerTypeFilter : 0 , 
84+       customFilter : "" 
85+     } ,  function ( items )  { 
86+ 
87+       var  filterString  =  getFilterString ( 
88+         items . questionsWithCodeFilter ,  
89+         items . communityWikisFilter ,  
90+         items . excludeDuplicateQuestionsFilter ,  
91+         items . answerTypeFilter ,  
92+         items . customFilter ) ; 
93+       chrome . omnibox . setDefaultSuggestion ( {  description : filterString  +  query  } ) ; 
7894  } 
7995) 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments