Open the downloaded file now if the DownloadItem is complete; otherwise returns an error through runtime. Requires the "downloads. An onChanged event will fire when the item is opened for the first time.
Pause the download. If the request was successful the download is in a paused state. Otherwise runtime. The request will fail if the download is not active. Remove the downloaded file if it exists and the DownloadItem is complete; otherwise return an error through runtime. Resume a paused download. If the request was successful the download is in progress and unpaused. Find DownloadItem. Set query to the empty object to get all DownloadItem. To get a specific DownloadItem , set only the id field.
To page through a large number of items, set orderBy: ['-startTime'] , set limit to the number of items per page, and set startedAfter to the startTime of the last item from the last page.
Enable or disable the gray shelf at the bottom of every window associated with the current browser profile. The shelf will be disabled as long as at least one extension has disabled it.
Enabling the shelf while at least one other extension has disabled it will return an error through runtime.
When any of a DownloadItem 's properties except bytesReceived and estimatedEndTime changes, this event fires with the downloadId and an object containing the properties that changed. This event fires with the DownloadItem object when a download begins. During the filename determination process, extensions will be given the opportunity to override the target DownloadItem.
Each extension may not register more than one listener for this event. Each listener must call suggest exactly once, either synchronously or asynchronously. If the listener calls suggest asynchronously, then it must return true. If the listener neither calls suggest synchronously nor returns true , then suggest will be called automatically. The DownloadItem will not complete until all listeners have called suggest. Listeners may call suggest without any arguments in order to allow the download to use downloadItem.
If more than one extension overrides the filename, then the last extension installed whose listener passes a suggestion object to suggest wins. In order to avoid confusion regarding which extension will win, users should not install extensions that may conflict.
If the download is initiated by download and the target filename is known before the MIME type and tentative filename have been determined, pass filename to download instead. Sometimes you may want to download the extension file so that you can install the extension even if it is not available in the Chrome store, see and analyze how the extension actually works, etc.
No matter what the reason is, if you ever want to download and save a Chrome extension as a CRX file, here is how to do it. Generally there are three different ways to download the Chrome extensions.
I will show you all three ways; just follow the one that you are most comfortable with. Before you do anything you need to know the Extension ID of the extension you want to download.
The above action will open the Extensions page. Find the folder with the extension ID, and copy it to your desktop. Now, according to Google, "to protect you while you browse, Chrome only lets you use extensions that have been published on the Chrome Web Store.
If you are willing to assume the risk, there is a side door that Google left ajar for developers to test out their extensions, which you can use to install extensions that aren't listed in the Chrome Web Store. And here's the part where I say again that installing unverified extensions from unknown sources is risky and could expose your computer to malicious code.
Do you if this still works? Still works, but hit the same problem I was having with chrome downloads. Chrome is not ok with allowing extensions to download multiple files. AmanicA AmanicA 4, 1 1 gold badge 30 30 silver badges 47 47 bronze badges. For current people: SteveMC's answer no longer works, but this one does. Apoorv Saxena Apoorv Saxena 3, 9 9 gold badges 28 28 silver badges 45 45 bronze badges.
The concision is much appreciated, wish I'd noticed it sooner. There's no need to simulate a click on a hidden a tag. Is this script in the content script or background script or somewhere else? I am getting a "Uncaught TypeError: Cannot read property 'download' of undefined" on the line "chrome.
BlobBuilder window. Kinlan Kinlan Where do I specify the file I am trying to download? That is up to you. It could be responseBlob on the xhr request — Kinlan. Yah, Can you edit the code to show how to do that? I have no idea where to put the location. How can you set it to download as the correct file type? As you might have noticed on clicking the Add to Chrome button the CRX file is downloaded and installed automatically once the download completes.
But what if you need the CRX file of the extension? Another advantage of having the CRX file is that it is possible to extract the code from it. The code will be like golden nuggets for a beginner who is trying to learn or starting with Chrome extensions development. Whenever you add a Chrome plugin, it is installed automatically.
0コメント