From 3e632252abafaf70016932683eb4be6f5c8d77c5 Mon Sep 17 00:00:00 2001 From: qinglong Date: Sun, 14 Jun 2026 11:07:29 +0800 Subject: [PATCH] =?UTF-8?q?debug:=20loadPluginPage=20=E5=8A=A0=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E8=BF=BD=E8=B8=AA=E9=94=99=E8=AF=AF=E6=9D=A5=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/web_panel/home.html | 2 +- static/web_panel/js/app.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/static/web_panel/home.html b/static/web_panel/home.html index 7d10e62..f928ca9 100644 --- a/static/web_panel/home.html +++ b/static/web_panel/home.html @@ -79,6 +79,6 @@ - + diff --git a/static/web_panel/js/app.js b/static/web_panel/js/app.js index 08594cd..16170f2 100644 --- a/static/web_panel/js/app.js +++ b/static/web_panel/js/app.js @@ -124,7 +124,7 @@ async function loadPage(pageName) { var cleanHtml = html.replace(/]*>([\s\S]*?)<\/script>/gi, function(m,code){ scripts.push(code.trim()); return ''; }); content.innerHTML = cleanHtml; - scripts.forEach(function(code){ + scripts.forEach(function(code){ console.log("loadPluginPage executing script from:", pluginName, "length:", code.length); try { var s=document.createElement('script'); s.textContent=code; document.head.appendChild(s); document.head.removeChild(s); } catch(ex){ console.error('Inline script error:', ex); } }); @@ -187,7 +187,7 @@ async function loadPluginPage(pluginName) { content.style.padding = '0'; content.innerHTML = '
'+clean+'
'; - scripts.forEach(function(code){ + scripts.forEach(function(code){ console.log("loadPluginPage executing script from:", pluginName, "length:", code.length); try { var s=document.createElement('script'); s.textContent=code; document.head.appendChild(s); document.head.removeChild(s); } catch(ex){ console.error('Plugin script error:', ex); } }); @@ -253,7 +253,7 @@ window.pickPath = function(mode, callback) { var clean = html.replace(/]*>([\s\S]*?)<\/script>/gi, function(m,code){ scripts.push(code.trim()); return ''; }); contentArea.innerHTML = clean; // Execute scripts - scripts.forEach(function(code){ + scripts.forEach(function(code){ console.log("loadPluginPage executing script from:", pluginName, "length:", code.length); try { var s=document.createElement('script'); s.textContent=code; document.head.appendChild(s); document.head.removeChild(s); } catch(ex){} });