From db2d4aa4e38ebf0a381f2ed13d8c26e30c79b4e6 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Fri, 18 Oct 2013 21:02:43 +0200 Subject: APIDump: Fixed offline JS. This time it's really offline :) --- MCServer/Plugins/APIDump/main.lua | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'MCServer/Plugins/APIDump/main.lua') diff --git a/MCServer/Plugins/APIDump/main.lua b/MCServer/Plugins/APIDump/main.lua index eadea622b..6d85a1281 100644 --- a/MCServer/Plugins/APIDump/main.lua +++ b/MCServer/Plugins/APIDump/main.lua @@ -295,19 +295,10 @@ function DumpAPIHtml() ]]); f:close(); - -- Copy the CSS file to the output folder (overwrite any existing): - cssf = io.open("API/main.css", "w"); - if (cssf ~= nil) then - cssfi = io.open(g_Plugin:GetLocalDirectory() .. "/main.css", "r"); - if (cssfi ~= nil) then - local CSS = cssfi:read("*all"); - cssf:write(CSS); - cssfi:close(); - end - cssf:close(); - end - - cFile:Copy(g_Plugin:GetLocalDirectory() .. "/run_prettify.js", "API/run_prettify.js"); + -- Copy the static files to the output folder (overwrite any existing): + cFile:Copy(g_Plugin:GetLocalFolder() .. "/main.css", "API/main.css"); + cFile:Copy(g_Plugin:GetLocalFolder() .. "/prettify.js", "API/prettify.js"); + cFile:Copy(g_Plugin:GetLocalFolder() .. "/prettify.css", "API/prettify.css"); cFile:Copy(g_Plugin:GetLocalFolder() .. "/lang-lua.js", "API/lang-lua.js"); -- List the documentation problems: @@ -678,7 +669,8 @@ function WriteHtmlClass(a_ClassAPI, a_AllAPI) MCServer API - ]] .. a_ClassAPI.Name .. [[ Class - + + @@ -793,7 +785,8 @@ function WriteHtmlHook(a_Hook) MCServer API - ]] .. HookName .. [[ Hook - + + -- cgit v1.2.3