📄 internetbookmark.luac.lua
字号:
-- Decompiled using luadec 0.6 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;0,0,1,19,24,27,34,37,40,64;;0,17,22,25,31,34;0,2,13,16,22,25;;0,3;0,23;;;;;;21,32,46,48,49;12,29;; 29b57170_manila.luac
require("class")
require("scrollphysics")
require("internetpush_svc")
require("io_svc")
require("theme")
OperaUserDataRoot = "\\Windows\\Opera9"
OperaImagesRoot = OperaUserDataRoot .. "\\Images"
OperaFavoritesFilePath = OperaUserDataRoot .. "\\opera6.adr"
OperaLaunchFavoriteUIArg = "/Bookmarks"
OperaLaunchHomeArg = "/home"
MaxFavoritesListLength = 25
FavoriteLoader = OperaFavoriteLoader(OperaFavoritesFilePath)
IsEnterFolder = false
HandleItemCreated = function(l_1_0, l_1_1)
local l_1_2 = l_1_1.Namespace
l_1_0.IsRealized = true
l_1_1.Tag = l_1_0
l_1_1.Focusable = true
l_1_1.OnSelected:connect(HandleItemSelected)
l_1_1.OnDeselected:connect(HandleItemDeselected)
l_1_1.onKeyDown:connect(HandleItemKeyDown)
local l_1_3 = l_1_2:FindName("Seperator")
l_1_3.Position.y = -79
local l_1_4 = l_1_2:FindName("OperatorLinkGroup")
local l_1_5 = l_1_2:FindName("UserFavoriteGroup")
l_1_4._visible = false
l_1_5._visible = true
l_1_5._visible = true
l_1_5.Duration = 40
local l_1_6 = l_1_2:FindName("FavoriteText")
local l_1_7 = l_1_2:FindName("FavoriteUrl")
local l_1_8 = l_1_2:FindName("FavoriteImage")
if l_1_0.Text ~= nil and l_1_6 ~= nil then
l_1_6.String = l_1_0.Text
end
if l_1_0.DisplayUrl ~= nil and l_1_7 ~= nil then
l_1_7.String = l_1_0.DisplayUrl
end
if l_1_0.IsFolder == true then
l_1_7.String = l_1_0.ItemCount .. " items"
end
local l_1_9 = l_1_2:FindName("DownLoadStatus")
if l_1_0.IsFolder == true and l_1_0.ItemCount ~= 0 then
l_1_9:SetTextureRef("Arrow")
l_1_9._visible = true
l_1_9.Size.width = 19
l_1_9.Size.height = 31
l_1_9.Position.y = -24.5
else
l_1_9._visible = false
end
l_1_6.Color = GetMainTextUnselectedColor()
l_1_7.Color = GetSubTextUnselectedColor()
if l_1_0.IsFolder ~= true then
l_1_8:SetTextureRef("FavoriteLinkImageDn")
else
l_1_8:SetTextureRef("FavoriteFolderImage")
end
l_1_0.Selector = l_1_2:FindName("Selector")
if l_1_0.Selector ~= nil then
l_1_0.Selector._visible = false
end
end
HandleItemDestroyed = function(l_2_0)
l_2_0.Tag.IsRealized = false
l_2_0.OnSelected:disconnect(HandleItemSelected)
l_2_0.OnDeselected:disconnect(HandleItemDeselected)
l_2_0.onKeyDown:disconnect(HandleItemKeyDown)
end
HandleItemSelected = function(l_3_0)
if l_3_0.Tag.Selector ~= nil then
l_3_0.Tag.Selector._visible = true
trace("HandleItemSelected \n")
DisableSelectorTimer:Stop()
DisableSelectorTimer:Start()
end
local l_3_1 = l_3_0.Namespace
if l_3_1 ~= nil then
local l_3_2 = l_3_1:FindName("UserFavoriteGroup")
local l_3_3 = l_3_1:FindName("FavoriteImage")
if l_3_2._visible == true then
local l_3_4 = l_3_1:FindName("FavoriteText")
local l_3_5 = l_3_1:FindName("FavoriteUrl")
l_3_4.Color = GetMainTextSelectedColor()
l_3_5.Color = GetSubTextSelectedColor()
end
if l_3_2._visible == true and l_3_3 ~= nil then
if l_3_0.Tag.IsFolder then
else
l_3_3:SetTextureRef("FavoriteLinkImageUp")
end
end
end
end
HandleItemDeselected = function(l_4_0)
local l_4_1 = l_4_0.Tag.Selector
if l_4_1 ~= nil then
l_4_1 = l_4_0.Tag
l_4_1 = l_4_1.Selector
l_4_1._visible = false
end
l_4_1 = l_4_0.Namespace
if l_4_1 ~= nil then
local l_4_2 = l_4_1:FindName("UserFavoriteGroup")
local l_4_3 = l_4_1:FindName("FavoriteImage")
if l_4_2._visible == true then
local l_4_4 = l_4_1:FindName("FavoriteText")
local l_4_5 = l_4_1:FindName("FavoriteUrl")
l_4_4.Color = GetMainTextUnselectedColor()
l_4_5.Color = GetSubTextUnselectedColor()
end
if l_4_2._visible == true and l_4_3 ~= nil then
if l_4_0.Tag.IsFolder then
else
l_4_3:SetTextureRef("FavoriteLinkImageDn")
end
end
end
end
HandleItemKeyDown = function(l_5_0, l_5_1)
if (l_5_1.Code == KeyCode_Return or l_5_1.Code == KeyCode_Space) then
if l_5_0.Tag ~= nil then
HandleLinkPressed(l_5_0.Tag)
end
else
trace("HandleItemKeyDown \n")
DisableSelectorTimer:Stop()
DisableSelectorTimer:Start()
end
end
HandleListSelection = function(l_6_0)
local l_6_1 = GizmoListView:GetGenerator()
HandleLinkPressed(l_6_1:GetDataByRealizedIndex(l_6_0))
end
OpenFolder = function(l_7_0)
IsEnterFolder = true
if CountOfFavorites ~= nil and CountOfFavorites > 0 then
for i = 1, CountOfFavorites do
GizmoListCollection:pop_back()
end
end
CountOfFavorites = 0
local l_7_1 = FavoriteLoader:LoadbyFolder(l_7_0, true)
if l_7_1 ~= nil then
CountOfFavorites = l_7_1:GetCount()
trace("Got " .. tostring(CountOfFavorites) .. " favorites.\n")
if GizmoListCollection:GetCount() == 1 and l_7_0 == 0 then
GizmoListCollection:pop_back()
end
for i = 0, CountOfFavorites - 1 do
local item = l_7_1:GetItem(i)
if item ~= nil then
local url = WebURL(item.Url):GetServer()
local stuff = {Text = item.Name, Url = item.Url, DisplayUrl = url, Id = item.Id, IsFolder = item.IsFolder, ItemCount = item.ItemCount}
GizmoListCollection:push_back(stuff)
end
end
end
end
HandleLinkPressed = function(l_8_0)
if l_8_0 == nil then
return
end
if l_8_0.IsFolder == true then
if l_8_0.ItemCount ~= 0 then
OpenFolder(l_8_0.Id)
end
else
if l_8_0.Url ~= nil then
LaunchBrowser(l_8_0.Url)
elseif l_8_0.Executable ~= nil then
Shell_NavigateTo(l_8_0.Executable, l_8_0.CommandLine)
end
end
end
HandleLeftSoftkey = function()
trace("Press back!!!!!")
if IsEnterFolder == true then
local fvg = FavoriteLoader:GetLastLevelId(0)
trace("Last_id=" .. tostring(fvg))
OpenFolder(fvg)
if fvg == 0 then
IsEnterFolder = false
end
else
_application.Navigation:NavigateBack()
end
end
HandleVisibilityChanged = function()
if _application.Visibility == true then
DisableSelector()
if FavoriteLoader:IsDataStaleSinceLoad() == true then
RebuildFavoriteList(GizmoListView:GetGenerator().Collection)
end
end
end
LaunchBrowser = function(l_11_0)
if l_11_0 == nil then
l_11_0 = ""
end
trace("[LaunchBrowser]....")
if DefaultBrowserIsIE then
LaunchIEBrowser(l_11_0)
else
Shell_NavigateTo(ShellLocation_Opera, l_11_0)
end
end
LaunchIEBrowser = function(l_12_0)
if l_12_0 == OperaLaunchHomeArg then
Shell_NavigateTo(ShellLocation_IEHome)
return
elseif l_12_0 == OperaLaunchFavoriteUIArg then
Shell_NavigateTo(ShellLocation_IEFavorites)
return
else
Shell_NavigateTo("\\Windows\\iexplore.exe", l_12_0)
return
end
end
RebuildFavoriteList = function()
if CountOfFavorites ~= nil and CountOfFavorites > 0 then
for i = 1, CountOfFavorites do
GizmoListCollection:pop_back()
end
end
CountOfFavorites = 0
local l_13_0 = FavoriteLoader:Load(false, MaxFavoritesListLength)
CountOfFavorites = l_13_0:GetCount()
if CountOfFavorites > 0 then
local l_13_1 = FavoriteLoader:LoadbyFolder(0, true)
if l_13_1 ~= nil then
CountOfFavorites = l_13_1:GetCount()
trace("Got " .. tostring(CountOfFavorites) .. " favorites.\n")
for i = 0, CountOfFavorites - 1 do
local item = l_13_1:GetItem(i)
if item ~= nil then
local url = WebURL(item.Url):GetServer()
local stuff = {Text = item.Name, Url = item.Url, DisplayUrl = url, Id = item.Id, IsFolder = item.IsFolder, ItemCount = item.ItemCount}
GizmoListCollection:push_back(stuff)
end
end
end
end
end
InitializeList = function()
GizmoListCollection = VectorNotifyLuaObject()
_application.OnVisibilityChanged:connect(HandleVisibilityChanged)
RebuildFavoriteList()
local l_14_0 = SequentialLayout()
l_14_0:SetItemSize(MainCamera.Viewport.width, 80, 0)
local l_14_1 = SequentialLibraryGeneratorLuaObject(GizmoListCollection, GizmoListView:GetMovie(), GizmoListView.ComponentLibraryName, GizmoListView.ComponentLibraryID)
GizmoListView:SetLayout(l_14_0)
GizmoListScrollPhysics = ScrollPhysics(GizmoListView, GizmoListView, HandleListSelection)
GizmoListScrollPhysics:ConnectMouseEvents()
l_14_1.ItemCreated:connect(HandleItemCreated)
l_14_1.ItemDestroyed:connect(HandleItemDestroyed)
l_14_1.RecycleItems = true
GizmoListView:SetGenerator(l_14_1)
GizmoListView:ForceLayout()
GizmoListView:Focus()
end
if _application.Store:GetIntValue(Lifetime_Permanent, "DefaultBrowserIsIE") == 1 then
DefaultBrowserIsIE = true
else
DefaultBrowserIsIE = false
end
GizmoListView.Viewport.y = 636
InitializeList()
_application:SetLeftSoftkey(Softkey(Locale:GetString("IDS_BACK"), HandleLeftSoftkey))
_application:SetRightSoftkey(Softkey("", nil))
DisableSelector = function()
DisableSelectorTimer:Stop()
GizmoListView:GetGenerator().SelectedIndex = -1
trace("Set GizmoListView.selectedIndex = -1\n")
end
DisableSelectorTimer = timer(5)
DisableSelectorTimer:Stop()
DisableSelectorTimer.OnElapsed:connect(DisableSelector)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -