diff --git a/static/opax.html b/static/opax.html
index a8676dc..c53b118 100644
--- a/static/opax.html
+++ b/static/opax.html
@@ -287,16 +287,13 @@
.roi-divider{width:1px;height:60px;background:var(--border);flex-shrink:0}
@media(max-width:600px){.roi-divider{display:none}.roi-box{gap:16px}}
- /* BROWSER PANEL */
- .browser-bar{display:flex;align-items:center;gap:8px;padding:10px 16px;border-bottom:1px solid var(--border);background:var(--bg-2);flex-shrink:0}
- .browser-url-input{flex:1;background:var(--bg-3);border:1px solid var(--border);border-radius:8px;padding:6px 12px;font-family:var(--mono);font-size:12px;color:var(--text);outline:none;transition:border-color .2s}
- .browser-url-input:focus{border-color:var(--accent)}
- .browser-url-input::placeholder{color:var(--text-faint)}
- .browser-go-btn{padding:6px 14px;border-radius:8px;background:var(--accent);color:#fff;font-size:12px;font-weight:600;transition:background .14s;white-space:nowrap}
- .browser-go-btn:hover{background:#6a4cff}
- .browser-frame{flex:1;border:none;width:100%;height:100%;background:var(--bg)}
- .browser-error{display:none;flex:1;align-items:center;justify-content:center;flex-direction:column;gap:12px;color:var(--text-faint);font-family:var(--mono);font-size:13px}
- .browser-error.show{display:flex}
+ /* DOCS BROWSER PANEL β Fix 4 */
+ .docsbrowser-toolbar{display:flex;align-items:center;gap:8px;padding:10px 16px;border-bottom:1px solid var(--border);background:var(--bg-2);flex-shrink:0}
+ .docsbrowser-select{flex:1;background:var(--bg-3);border:1px solid var(--border);border-radius:8px;padding:6px 10px;font-family:var(--mono);font-size:12px;color:var(--text);outline:none;cursor:pointer;transition:border-color .2s}
+ .docsbrowser-select:focus{border-color:var(--accent)}
+ .docsbrowser-refresh{padding:6px 14px;border-radius:8px;background:var(--accent);color:#fff;font-size:12px;font-weight:600;transition:background .14s;white-space:nowrap}
+ .docsbrowser-refresh:hover{background:#6a4cff}
+ .docsbrowser-body{flex:1;overflow-y:auto}
@@ -348,7 +345,7 @@
π MD
-
π
+
π
-
Browser
-
Intern dokumentasjonsleser Β· /docs/ proxy
+
Docs Browser
+
docs/MASTERPLAN.md
-
-
-
+
+
+
-
-
β οΈ
-
Kunne ikke laste siden
+
-
@@ -642,7 +646,7 @@ const PANEL_META = {
sites: ['Sites & Moduler', 'Alle Vauco-flater'],
terminal: ['Terminal', 'OPAX agent Β· Cloud Run'],
md: ['MD β Dokumenter', 'Kjerndoks Β· vauco-saas/OSVauco'],
- browser: ['Browser', 'Intern dokumentasjonsleser Β· /docs/ proxy'],
+ browser: ['Docs Browser', 'Intern dokumentasjonsleser Β· /docs/ proxy'],
}
const SITES_DATA = [
@@ -736,6 +740,7 @@ function go(name){
if(name==='terminal') initTerminal()
if(name==='md') renderMdGrid()
if(name==='pricing') initPricing()
+ if(name==='browser') docsBrowserInit()
}
function initPricing(){
@@ -744,22 +749,33 @@ function initPricing(){
updatePricing(slider.value)
}
-// BROWSER PANEL
-function browserNav(){
- const raw = document.getElementById('browser-url').value.trim()
- if(!raw) return
- const url = raw.startsWith('http') ? raw : '/docs/'+raw.replace(/^\/docs\//,'')
- document.getElementById('browser-error').classList.remove('show')
- document.getElementById('browser-frame').src = url
+// DOCS BROWSER β Fix 4: /docs/ proxy only, marked.js rendering, no external URLs
+let _docsBrowserLoaded = false
+function docsBrowserInit(){
+ if(_docsBrowserLoaded) return
+ _docsBrowserLoaded = true
+ docsBrowserLoad()
}
-function browserRefresh(){
- const f = document.getElementById('browser-frame')
- if(f.src) f.src = f.src
+
+async function docsBrowserLoad(){
+ const sel = document.getElementById('docsbrowser-select')
+ const path = sel ? sel.value : 'docs/MASTERPLAN.md'
+ const viewer = document.getElementById('docsbrowser-viewer')
+ viewer.innerHTML = '
β³ Laster '+esc(path)+'...
'
+ document.getElementById('docsbrowser-sub').textContent = path
+ document.getElementById('docsbrowser-gh-btn').href = GH_BLOB + path
+ try{
+ const res = await fetch('/docs/'+path+'?t='+Date.now())
+ if(!res.ok) throw new Error('HTTP '+res.status)
+ const raw = await res.text()
+ viewer.innerHTML = marked.parse(raw)
+ }catch(e){
+ viewer.innerHTML = '
β Kunne ikke laste: '+esc(e.message)+'
'
+ }
}
-function browserFrameLoad(){ document.getElementById('browser-error').classList.remove('show') }
-function browserFrameError(){
- document.getElementById('browser-error-msg').textContent = 'Siden kunne ikke lastes β sjekk URL eller /docs/-proxy'
- document.getElementById('browser-error').classList.add('show')
+
+function docsBrowserSelect(path){
+ docsBrowserLoad()
}
// BUILD STATUS POLL
@@ -1103,4 +1119,4 @@ renderTierGrid(5000)
updatePricing(5000)