Last active
April 28, 2020 19:26
-
-
Save neilio/1308745d37383863fffbd13e9c0b197b to your computer and use it in GitHub Desktop.
Export Chrome search keywords
This file contains 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