NirSoft = {}
function NirSoft:Startup()
local cachebuttons = [[
]]
browser.inserthtml('dlg.prefs',-1,'#cachebuttons',cachebuttons)
browser.navbar:inserthtml('#tcache','#navbarmenu-list','
Cookies
')
browser.navbar:inserthtml(-1,'#tcachemenu','
HTTP Cache
')
browser.addlibinfo('ChromeCacheView','file:Extensions\\ChromeCacheView\\ChromeCacheView.exe','Nir Sofer')
browser.addlibinfo('ChromeCookiesView','file:Extensions\\ChromeCookiesView\\ChromeCookiesView.exe','Nir Sofer')
end
function NirSoft:LaunchCacheView()
local ccvdir = app.dir..'Extensions\\ChromeCacheView\\'
local cfgfile = ccvdir..'ChromeCacheView.cfg'
if scop.file.exists(cfgfile) == false then
local c = scl.stringlist:new()
c:add('[General]')
c:add('RememberFolder=1')
c:add('CacheFolder='..browser.info.cachedir) -- ..\\..\\Config\\Cache
c:savetofile(cfgfile)
c:release()
end
scop.file.exec(ccvdir..'ChromeCacheView.exe')
end
function NirSoft:LaunchCookiesView()
local ccvdir = app.dir..'Extensions\\ChromeCookiesView\\'
local cfgfile = ccvdir..'ChromeCookiesView.cfg'
if scop.file.exists(cfgfile) == false then
local c = scl.stringlist:new()
c:add('[General]')
c:add('LoadCookiesFileOnStart=1')
c:add('CookiesFile='..browser.info.cachedir..'Cookies') -- ..\\..\\Config\\Cache\\Cookies
c:savetofile(cfgfile)
c:release()
end
scop.file.exec(ccvdir..'ChromeCookiesView.exe')
end