Frontend Script Boxes let operators keep small JavaScript customizations inside Tools and reuse them across multiple frontend surfaces.
Current supported surfaces:
vbulletin – for forum/frontend HTML snippets and vBulletin-specific tweaksfeed – for /feed-related widgets, embeddable news boxes, and script-driven external site integrations/admin/security/vbulletin/feed-adminpermission:rssEach saved box currently supports:
<script src="…"><script> tag)GET /api/managed-scripts/{surface}Returns the current public/active script boxes for one surface.
Allowed surface values:
vbulletinfeedformat=both (default) – return both the merged script and the separated scripts[]format=merged – return only the merged bundle textformat=separate – return only the separated scripts[]feed_ids=63,91 or feeds=63,91 – optional feed URL ids for feed-widget bundles that should target specific feedscategories=coding,fact-check, groups=coding,fact-check, or category_slugs=coding,fact-check – optional category/group slugs for feed-widget bundleslimit=10 – optional item/widget limit hint, clamped to 1..100For the feed surface these query values are normalized and echoed back as query_context.filters, so embeddable widgets can react to the selected feeds/groups without inventing their own parsing rules.
{
"ok": true,
"surface": "feed",
"count": 2,
"bundle_url": "https://tools.tornevall.net/api/managed-scripts/feed/bundle.js",
"bundle_tag": "<script src=\"https://tools.tornevall.net/api/managed-scripts/feed/bundle.js\"></script>",
"query_context": {
"surface": "feed",
"filters": {
"feed_ids": [63],
"category_slugs": ["coding"],
"limit": 10
},
"has_filters": true
},
"scripts": [
{
"id": 7,
"surface": "feed",
"title": "Compact feed widget",
"script_body": "(() => { console.log('feed widget'); })();",
"script_src": "",
"ai_instruction": "Render a compact feed card widget",
"sort_order": 10,
"is_enabled": true,
"updated_by_user_id": 1,
"updated_at": "2026-04-27T21:40:00+00:00"
},
{
"id": 8,
"surface": "feed",
"title": "External feed helper",
"script_body": "",
"script_src": "https://cdn.example.com/feed-helper.js",
"ai_instruction": "",
"sort_order": 20,
"is_enabled": true,
"updated_by_user_id": 1,
"updated_at": "2026-04-27T21:41:00+00:00"
}
],
"merged_script": "(function(){\nwindow.__toolsManagedScriptBoxes = ..."
}
GET /api/managed-scripts/{surface}/bundle.jsReturns a ready-to-embed JavaScript bundle for the selected surface.
This route is intended for direct browser/frontend use, for example:
<script src="https://tools.tornevall.net/api/managed-scripts/vbulletin/bundle.js"></script>
Feed-widget example with explicit filters:
<script src="https://tools.tornevall.net/api/managed-scripts/feed/bundle.js?feed_ids=63&categories=coding&limit=10"></script>
The merged bundle currently:
sort_order, then by idscript_src as an external <script src> loaderwindow.__toolsManagedScriptBoxes guardwindow.__toolsManagedScriptBoxes.context.filters (feed_ids[], category_slugs[], limit)/feed news card on an arbitrary external site/api/rss or /api/rss/feed/{selector} and present custom compact summaries<script> tags into the inline script field.