📌  相关文章
📜  以递归方式将所有 html 页面下载为单个文件 chrome extenio - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:35.508000             🧑  作者: Mango

代码示例1
var dir = "/videos";
var fileextension = ".mp4";
$.ajax({
    //This will retrieve the contents of the folder if the folder is configured as 'browsable'
    url: dir,
    success: function (data) {
        // List all mp4 file names in the page
        $(data).find("a:contains(" + fileextension + ")").each(function () {
            var filename = this.href.replace(window.location.host, "").replace("http:///", "");
            $("body").append($(""));
        });
    }
});