Brazen Framework - Download Manager

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

Hindi dapat direktang i-install ang script na ito. Ito ay isang library para sa iba pang mga script na isasama sa meta directive. // @require https://update.greasyfork.org/scripts/587126/1876581/Brazen%20Framework%20-%20Download%20Manager.js

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:

May akda
brazenvoid
Bersyon
1.0.0
Nilikha
2026-07-15
Na update
2026-07-15
Laki
50.1 KB
Lisensya
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.