Skip to content

Instantly share code, notes, and snippets.

@zmwangx
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zmwangx/20486e38be956ee67a5a to your computer and use it in GitHub Desktop.
Save zmwangx/20486e38be956ee67a5a to your computer and use it in GitHub Desktop.
Chrome extension to erase completed items in the download history from the beginning of time, thus eliminating the downloads icon next to the address bar.
chrome.commands.onCommand.addListener(function(command) {
if (command == "erase_completed_downloads") {
eraseCompletedDownloads();
}
});
function eraseCompletedDownloads() {
chrome.downloads.erase({state: "complete"});
}
{
"manifest_version": 2,
"name": "Erase Completed Downloads",
"version": "0.1",
"description": "Erase completed items in the download history from the beginning of time, thus eliminating the downloads icon next to the address bar.",
"background": {
"scripts": ["background.js"],
"persistent": false
},
"commands": {
"erase_completed_downloads": {
"suggested_key": { "default": "Ctrl+C" },
"description": "Erase completed downloads"
}
},
"permissions": [
"downloads"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment