<postprocess>, fix tab open/close, fix some URL bugs

This commit is contained in:
Face
2025-08-30 14:19:03 +03:00
parent 9344c7818a
commit 322cb4072e
59 changed files with 1144 additions and 17 deletions

View File

@@ -430,6 +430,9 @@ func get_all_images() -> Array[String]:
func get_all_scripts() -> Array[String]:
return get_attribute_values("script", "src")
func get_all_postprocess() -> Array[String]:
return get_attribute_values("postprocess", "src")
func process_scripts(lua_api: LuaAPI, _lua_vm) -> void:
if not lua_api:
print("Warning: Lua API not available for script processing")
@@ -459,6 +462,14 @@ func process_external_scripts(lua_api: LuaAPI, _lua_vm, base_url: String = "") -
if not script_content.is_empty():
lua_api.execute_lua_script(script_content)
func process_postprocess() -> HTMLParser.HTMLElement:
var postprocess_elements = find_all("postprocess")
if postprocess_elements.is_empty():
return null
# Return the last postprocess element (last defined wins)
return postprocess_elements[-1]
func get_all_stylesheets() -> Array[String]:
return get_attribute_values("style", "src")