how to download bulk image in order?

Is there any way to bulk download images in order as we surf those image or from links?

i know few bulk image down loader those can download perfectly but i want them in order. i have tried sort by date/created date but unable to mainten the order.

for example . i want to download those image and set in order 1st image -like Monday: PiƱa Colada Chicken Salad, then 2nd Tuesday: Baked Cod With Tomatoes and Garli.

any extension & software or any other worker around will be helpful.

Chrome extension: download text file in the latest version of Chrome

I’m a newbie of Chrome extension development. I’m working on a project which needs to generate a text file for user to download. With the help of experts in the Internet, I’m using a function like this:

function saveText(filename, text) {
    var tempElem = document.createElement('a');
    tempElem.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
    tempElem.setAttribute('download', filename);
    tempElem.click();
}

This function works perfect before. But when the Chrome was updated today, it no longer works – no prompt in the background console, the scripts work fine before and after this function. I’ve tried all the method, but cannot find why.

Any suggestions or hints will be appreciated. Thanks a lot!

JC

Extension which allows to download all videos in youtube playlist in one click

I have an idea, whenever i want to download youtube videos from youtube playlist, i have to download each of them one by one, instead of doing this manual work, can someone code an chrome extension so that i can download whole youtube videos in playlist in one single click?

Chrome Extension Accessing Downloads Folder Directory Path

A component of an extension that I’ve been developing requires the extension to save files and then (at a later time) open those files again. As far as I know, this can be done as long as the downloads directory is known. Saving is easy, you just use:

chrome.downloads.download({
    url: fileData,
    filename: "/AppGeneratedSubFolder/"+fileName,
    conflictAction:'overwrite',
    saveAs:false
}

And I can perform the opening process if I have included the correct permission in the manifest and have the “Allow access to file URLs” box checked by the user.

I can then access the file by using the following:

var missing = "userInputRightNow"
var open= "file:///"+missing+"/AppGeneratedSubFolder/"+fileName;
chrome.windows.create({
    url:open,
    type:'popup',
    state: 'maximized',
    focused:true,
});

However, this requires me to somehow get the content for the variable labeled missing. I have done this by directing users to the following page (i.e., opening it in a new window) and telling them to copy the directory into an input box within my application–I then save the value for future use by the application:

chrome://settings/?search=Ask%20where%20to%20save%20each%20file%20before%20downloading

However, I’m wondering if there is any better approach. I broadly understand the design decision to not expose a user’s file system to extension APIs. However, I’m wondering if I’m missing some work around:

  • Is there another permission that might enable this that I haven’t considered?
  • I don’t actually have any reason to “know” the missing information. I would be satisfied with a way to reference the relative path without knowing it.
  • Or some superior method to obtaining that missing information as trying to walk users through the process of copying and pasting it (no matter how clear) seems to be a major bottle neck in my installation process.

How to access the downloads folder directory path

A component of an extension that I’ve been developing requires the extension to save files and then (at a later time) open those files again. As far as I know, this can be done as long as the downloads directory is known. Saving is easy, you just use:

chrome.downloads.download({
    url: fileData,
    filename: "/AppGeneratedSubFolder/"+fileName,
    conflictAction:'overwrite',
    saveAs:false
}

And I can perform the opening process if I have included the correct permission in the manifest and have the “Allow access to file URLs” box checked by the user.

I can then access the file by using the following:

var missing = "userInputRightNow"
var open= "file:///"+missing+"/AppGeneratedSubFolder/"+fileName;
chrome.windows.create({
    url:open,
    type:'popup',
    state: 'maximized',
    focused:true,
});

However, this requires me to somehow get the content for the variable labeled missing. I have done this by directing users to the following page (i.e., opening it in a new window) and telling them to copy the directory into an input box within my application–I then save the value for future use by the application:

chrome://settings/?search=Ask%20where%20to%20save%20each%20file%20before%20downloading

However, I’m wondering if there is any better approach. I broadly understand the design decision to not expose a user’s file system to extension APIs. However, I’m wondering if I’m missing some work around:

  • Is there another permission that might enable this that I haven’t considered?
  • I don’t actually have any reason to “know” the missing information. I would be satisfied with a way to reference the relative path without knowing it.
  • Or some superior method to obtaining that missing information as trying to walk users through the process of copying and pasting it (no matter how clear) seems to be a major bottle neck in my installation process.

How can I reference a download item from a callback function that has its id as parameter?

Scenario: I execute one of the chrome.downloads API functions and, inside its callback function, I need to get info (other than the id of the item) about the downloadItem referenced by the downloadId. How do I do that, other than using chrome.downloads.search() or building my own array to “remember” the items in chrome.downloads.onCreated.addListener() – since, except the latter, almost all the callback functions there take only the id, and not the item itself, as a parameter?

I tried (and need something like) chrome.downloads.downloadItems[id] to reference it.

Use case scenario: if one needs the downloadItem‘s url or filename in the callback functions of other functions than chrome.downloads.onCreated.addListener() (e.g. chrome.downloads.open() or any other, for that matter, as the majority reference the items by their ids).

A side question, related to this: how do I check that the downloads were triggered by a certain function in my code, considering that in my tests, the order of execution is:

  1. chrome.downloads.onCreated listener (where I can reference the actual item, see above)
  2. then chrome.downloads.download() (where I can know where the download request originates in my code, but I can’t reference the actual item)
  3. then chrome.downloads.onChanged listener (when checking for download’s completion).

In other words, I need to know where the download was called from in my code, for a particular item, at the same time that I can get additional info on the download item (which I can do only in chrome.downloads.onCreated() for now, thus my questions here).

I hope I was clear in describing my problem – if not, feel free to ask in the comments, or check the relevant code below (I want to add the download info to the array only if the download originated from queryselected(), discarding other downloads that might happen during or after this):

function queryselected()
    {
    var selection = window.getSelection(),
            elements = document.querySelectorAll("[id^='element']");
    for (var i = 0; i < somearray.length; i++)
        {
        if (selection.containsNode(elements[i], true))
            {
            chrome.downloads.download
                (
                {url: somearray[i].url, filename: "element" + i + ".el", conflictAction: "uniquify"},
                function(downloadid)
                    {
                    console.log("downloads.download: ", downloadid);
// I can know where the download was triggered here, but
// I can't access the download item (only its id), so I do in the listener below
                    itemstoquery.push({id: downloadid, url: undefined, filename: undefined});
                    }
                );
            }
        }
    }

chrome.downloads.onCreated.addListener
    (
    function(downloaditem)
        {
        if (downloaditem)
            {
            console.log("downloads.onCreated: ", downloaditem.url);
            for (var i = 0; i < itemstoquery.length; i++)
                {
// I can access the download item here, but
// I can't know if its download was triggered by queryselected() above,
// since this executes BEFORE chrome.downloads.download()'s callback function
// As a result, the if below is never true, so I can't fill the array properly.
                if (downloaditem.id === itemstoquery[i].id)
                    {
                    itemstoquery[i].url = downloaditem.url;
                    itemstoquery[i].filename = downloaditem.filename;
                    console.log("Started downloading: ", itemstoquery[i]);
                    }
                }
            }
        }
    );

chrome.downloads.onChanged.addListener
(
    function(downloaddelta)
    {
    if ((downloaddelta.state) && (downloaddelta.state.current === "complete"))
        {
        console.log("downloads.onChanged: ", downloaddelta.id);
        var rf = chrome.downloads.removeFile(downloaddelta.id);
        var eh = chrome.downloads.erase({id: downloaddelta.id});
        }
    }
);

Note: I said 'other than chrome.downloads.search()' because it seems to me kind of redundant to "search" for a download item with it, since you already have its id and you basically work with it. I want to reference the download item while downloading it, not afterwards (where the search might have its role).