Skip to content

Commit

Permalink
Implement TaintLess.xml to avoid known taints
Browse files Browse the repository at this point in the history
  • Loading branch information
IrcDirk committed Oct 11, 2022
1 parent 8e1cd8a commit 7faf37d
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
1 change: 1 addition & 0 deletions Carbonite/Carbonite.toc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

Libs\libs.xml
Locales\Locales.xml
Taintless.xml
Carbonite.lua
NxUI.lua
NxOptions.lua
Expand Down
63 changes: 63 additions & 0 deletions Carbonite/Taintless.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<Ui><Script><![CDATA[--[[
TaintLess [20-10-19]
https://www.townlong-yak.com/addons/taintless
All rights reserved.
Permission is hereby granted to distribute unmodified copies of this file.
]]
local function purgeKey(t, k)
t[k] = nil
local c = 42
repeat
if t[c] == nil then
t[c] = nil
end
c = c + 1
until issecurevariable(t, k)
end
-- https://www.townlong-yak.com/bugs/Mx7CWN-RefreshOverread
if (tonumber(UIDD_REFRESH_OVERREAD_PATCH_VERSION) or 0) < 3 then
UIDD_REFRESH_OVERREAD_PATCH_VERSION = 3
hooksecurefunc("UIDropDownMenu_InitializeHelper", function()
if UIDD_REFRESH_OVERREAD_PATCH_VERSION ~= 3 then
return
end
for i=1, UIDROPDOWNMENU_MAXLEVELS do
for j=1+_G["DropDownList" .. i].numButtons, UIDROPDOWNMENU_MAXBUTTONS do
local b, _ = _G["DropDownList" .. i .. "Button" .. j]
_ = issecurevariable(b, "checked") or purgeKey(b, "checked")
_ = issecurevariable(b, "notCheckable") or purgeKey(b, "notCheckable")
end
end
end)
end
-- https://www.townlong-yak.com/bugs/Kjq4hm-DisplayModeTaint
if (tonumber(UIDROPDOWNMENU_OPEN_PATCH_VERSION) or 0) < 1 then
UIDROPDOWNMENU_OPEN_PATCH_VERSION = 1
hooksecurefunc("UIDropDownMenu_InitializeHelper", function(frame)
if UIDROPDOWNMENU_OPEN_PATCH_VERSION ~= 1 then
return
end
if UIDROPDOWNMENU_OPEN_MENU and UIDROPDOWNMENU_OPEN_MENU ~= frame
and not issecurevariable(UIDROPDOWNMENU_OPEN_MENU, "displayMode") then
purgeKey(_G, "UIDROPDOWNMENU_OPEN_MENU")
end
end)
end
-- https://www.townlong-yak.com/bugs/gXwH4P-IOFrameSelection
if (tonumber(IOFRAME_SELECTION_PATCH_VERSION) or 0) < 1 then
IOFRAME_SELECTION_PATCH_VERSION = 1
InterfaceOptionsFrame:HookScript("OnHide", function()
if IOFRAME_SELECTION_PATCH_VERSION == 1 then
InterfaceOptionsFrameCategories.selection = nil
end
end)
end
]]></Script></Ui>

0 comments on commit 7faf37d

Please sign in to comment.