Brazen Framework - View Layer

View layer for the Brazen userscripts framework

Tento skript by nemal byť nainštalovaný priamo. Je to knižnica pre ďalšie skripty, ktorú by mali používať cez meta príkaz // @require https://update.sleazyfork.org/scripts/416104/1847284/Brazen%20Framework%20-%20View%20Layer.js

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey, Greasemonkey alebo Violentmonkey.

Na inštaláciu tohto skriptu je potrebné nainštalovať rozšírenie, ako napríklad Tampermonkey.

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey, % alebo Violentmonkey.

Na nainštalovanie skriptu si budete musieť nainštalovať rozšírenie, ako napríklad Tampermonkey alebo Userscripts.

Na inštaláciu tohto skriptu je potrebné nainštalovať rozšírenie, ako napríklad Tampermonkey.

Na inštaláciu tohto skriptu je potrebné nainštalovať rozšírenie správcu používateľských skriptov.

(Už mám správcu používateľských skriptov, nechajte ma ho nainštalovať!)

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie, ako napríklad Stylus.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie, ako napríklad Stylus.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie, ako napríklad Stylus.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie správcu používateľských štýlov.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie správcu používateľských štýlov.

Na inštaláciu tohto štýlu je potrebné nainštalovať rozšírenie správcu používateľských štýlov.

(Už mám správcu používateľských štýlov, nechajte ma ho nainštalovať!)

Autor
brazenvoid
Verzia
3.1.1
Vytvorené
14.11.2020
Aktualizované
09.06.2026
Veľkosť
26,5 KB
Licencia
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).