Brazen Framework - Download Manager

Cross-tab download queue, resolution pipeline, and immediate downloads for Brazen user scripts

Ezt a szkriptet nem ajánlott közvetlenül telepíteni. Ez egy könyvtár más szkriptek számára, amik tartalmazzák a // @require https://update.greasyfork.org/scripts/587126/1876581/Brazen%20Framework%20-%20Download%20Manager.js hivatkozást.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

Advertisement:

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Advertisement:

Fejlesztő
brazenvoid
Verzió
1.0.0
Létrehozva
2026.07.15.
Frissítve
2026.07.15.
Size
50 KB
Licensz
GPL-3.0-only

Brazen Framework - Download Manager

Optional module for cross-tab batch downloads, page resolution, and immediate GM_download orchestration.

Setup

// @require ... Brazen Framework.js
// @require ... BrazenDownloadManager.js

this.configureDock({ orientations: ['right'], ... })
this.configureDownloadManager({
  enableConfigKey: 'enable-download-manager',
  downloadPaths: {
    folderConfigKey: 'download-folder',
    filenamePatternConfigKey: 'filename-pattern',
    subfolderPatternConfigKey: 'subfolder-pattern',
    defaultFolder: 'my-downloads',
    getPatternResolver: () => ({ chips, tagTypes, ignore, substitutions, ... }),
    extractMediaData: (el) => ({ id, md5, ext, ... }),
    extractTagGroups: () => ({ author: [], character: [], ... }),
    appendExtension: true,
    nameFallback: (data) => data.id || 'media',
  },
  pages: {
    search: { roles: ['selection'], itemSelector: 'span.thumb', resolveItem: (item) => ({ itemId, sourceUrl }) },
    media: { roles: ['enqueueMedia', 'immediateDownload'] },
  },
  downloadTypes: {
    post: {
      resolveFromSearch: (ctx) => ({ nextUrl: ctx.sourceUrl }),
      resolveFromMedia: (doc, ctx) => ({ mediaUrl, tagGroups, downloadId, data }),
    },
  },
  resolutionInitiationGapMs: 2000,
  downloadInitiationGapMs: 2000,
  getQueueItemId: (ctx) => ctx.itemId,
})

Immediate download

this.getDownloadManager().downloadImmediate({
  mediaElement: document.querySelector('#image'),
  removeMediaOnSuccess: true,
})

Framework delegation

BrazenFramework exposes downloadImmediate, enqueueDownload, isDownloadPageRole, etc. Download path helpers moved from framework v12 — use getDownloadManager() for buildDownloadPathFromPatterns and tag substitution helpers.