Created
          March 28, 2020 04:07 
        
      - 
      
 - 
        
Save saicharanreddyk/79963079dd542807d8e77df17637bc59 to your computer and use it in GitHub Desktop.  
    To download a JSON file with search engine settings
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | (function exportSEs() { | |
| /* Auxiliary function to download a file with the exported data */ | |
| function downloadData(filename, data) { | |
| const file = new File([data], { type: 'text/json' }); | |
| const elem = document.createElement('a'); | |
| elem.href = URL.createObjectURL(file); | |
| elem.download = filename; | |
| elem.click(); | |
| } | |
| /* Actual search engine export magic */ | |
| settings.SearchEnginesBrowserProxyImpl.prototype.getSearchEnginesList() | |
| .then((searchEngines) => { | |
| downloadData('search_engines.json', JSON.stringify(searchEngines.others)); | |
| }); | |
| }()); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment