Brazen Framework - View Layer

View layer for the Brazen userscripts framework

Detta skript bör inte installeras direkt. Det är ett bibliotek för andra skript att inkludera med meta-direktivet // @require https://update.sleazyfork.org/scripts/416104/1847284/Brazen%20Framework%20-%20View%20Layer.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!)

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!)

Upphovsman
brazenvoid
Version
3.1.1
Skapad
2020-11-14
Uppdaterad
2026-06-09
Size
26,5 KB
Licens
GPL-3.0-only

Brazen Framework — View Layer (developer guide)

Shared settings panel UI: #bv-ui, tabs, form controls, modals, bookmarks panel, compliance statistics widgets.

Greasy Fork: View Layer · Requires: Utilities · Used by: Configuration Manager, Framework core

Styles are inlined at runtime via GM_addStyle (source CSS ships with the module).


Role in the stack

BrazenFramework exposes this._uiGen (a BrazenViewLayer instance). You compose this._userInterface from its factory methods; the framework embeds the panel unless _disableUI is set (e.g. headless auto-download on certain page types).

Requires @grant GM_addStyle on the View Layer script or the app.


Panel structure

Typical layout:

createSettingsSection()
  └── createTabsSection([tab names], [tab panels])
        └── createTabPanel('Filters', isDefault).append([...fields...])
createBottomSection([statistics, separators, page buttons, Apply/Save/Reset])

Common building blocks:

Factory Use
createTitle(text) Section heading inside a tab
createSeparator() / createBreakSeparator() Horizontal rules
createFormActions(buttons, layout?) Button row or column
createStatisticsFormGroup(configKey) Filter removal count
createModal(title) Dialog shell

Tab switches call userScript._configurationManager.updateInterface() — set getSelectedSection()[0].userScript = this in _onAfterUIBuild if custom widgets need the app instance.


Modals

let modal = this._uiGen.createModal('Active hide rules')
this._uiGen.showModal(modal)
this._uiGen.hideModal(modal)

Compliance rule modal uses .bv-compliance-rule-* row classes.


Bookmarks panel

BrazenViewLayer.createBookmarksPanel(fieldKey, options) — list UI for addBookmarksField. Options include pageMatch for star state on current URL. Persistence is usually app-side (GM_setValue), not config backup.


Sidebar enhancements

enhanceTagSidebarCounts(container, slotBuilder) — injects hover action slots next to tag counts (bookmark / ignore / blacklist buttons on tag sidebar rows).


Custom styling

Apps often pass site-specific overrides through GM_addStyle in the app script. Keep structural classes (#bv-ui, .bv-tab-panel, .bv-group) so Configuration Manager bindings still align.


Resizer

Optional #bv-resizer handle for panel width — patch drag in _onAfterUIBuild if needed (not enabled by default).