11<Ui ><Script ><![CDATA[ --[[
22
3- TaintLess [23-05-18 ]
3+ TaintLess [23-09-09 ]
44https://www.townlong-yak.com/addons/taintless
55
66All rights reserved.
77
88Permission is hereby granted to distribute unmodified copies of this file.
99]]
1010
11- local function purgeKey(t, k)
12- local logLevel, c = GetCVar("taintLog"), -42
13- if (tonumber(logLevel) or 0) > 1 then
14- if CVarCallbackRegistry then
15- CVarCallbackRegistry:UnregisterEvent("CVAR_UPDATE")
16- end
17- SetCVar("taintLog", "1")
18- else
19- logLevel = nil
20- end
21- t[k] = nil
22- repeat
23- if t[c] == nil then
24- t[c] = nil
25- end
26- c = c - 1
27- until issecurevariable(t, k)
28- if logLevel then
29- SetCVar("taintLog", logLevel)
30- if CVarCallbackRegistry then
31- CVarCallbackRegistry:RegisterEvent("CVAR_UPDATE")
32- end
11+ local purgeKey do
12+ local e = {}
13+ function purgeKey(t, k)
14+ e.textures = t
15+ TextureLoadingGroupMixin.RemoveTexture(e, k)
3316 end
3417end
3518
3619local patch do
37- local q, skips = {}, securecall(function()
20+ local skips = securecall(function()
3821 local cb, r, _, an = select(4,GetBuildInfo()), {moon="haunted"}
3922 r.moon, _, an = nil, issecurevariable(r, "moon")
40- for m, v, clo, chi in (GetAddOnMetadata(an, "X-TaintLess-DisableMitigations") or ""):gmatch("([%a_]+)=(%d+):?(%d*):?(%d*)") do
23+ for m, v, clo, chi in (C_AddOns. GetAddOnMetadata(an, "X-TaintLess-DisableMitigations") or ""):gmatch("([%a_]+)=(%d+):?(%d*):?(%d*)") do
4124 if (clo == "" or cb >= clo+0) and (chi == "" or chi+0 >= cb) then
4225 r[m] = v + 0
4326 end
4427 end
4528 return r
4629 end)
4730 function patch(name, version, impl)
48- if name == nil then
49- for qf, v in pairs(q) do
50- securecall(qf, v)
51- end
52- elseif not ((tonumber(_G[name]) or 0) >= version or skips and skips[name] == version) then
53- _G[name], q[impl] = version, version
31+ if not ((tonumber(_G[name]) or 0) >= version or skips and skips[name] == version) then
32+ _G[name] = version
33+ securecall(impl, version)
5434 end
5535 end
5636end
5737
5838-- https://www.townlong-yak.com/addons/taintless/fixes/RefreshOverread
59- patch("UIDD_REFRESH_OVERREAD_PATCH_VERSION", 3 , function(V)
39+ patch("UIDD_REFRESH_OVERREAD_PATCH_VERSION", 5 , function(V)
6040 hooksecurefunc("UIDropDownMenu_InitializeHelper", function()
6141 for i=1, UIDD_REFRESH_OVERREAD_PATCH_VERSION == V and UIDROPDOWNMENU_MAXLEVELS or 0 do
6242 for j=1+_G["DropDownList" .. i].numButtons, UIDROPDOWNMENU_MAXBUTTONS do
@@ -69,7 +49,7 @@ patch("UIDD_REFRESH_OVERREAD_PATCH_VERSION", 3, function(V)
6949end)
7050
7151-- https://www.townlong-yak.com/addons/taintless/fixes/DisplayModeTaint
72- patch("UIDROPDOWNMENU_OPEN_PATCH_VERSION", 1 , function(V)
52+ patch("UIDROPDOWNMENU_OPEN_PATCH_VERSION", 3 , function(V)
7353 hooksecurefunc("UIDropDownMenu_InitializeHelper", function(frame)
7454 if UIDROPDOWNMENU_OPEN_PATCH_VERSION == V
7555 and UIDROPDOWNMENU_OPEN_MENU and UIDROPDOWNMENU_OPEN_MENU ~= frame
@@ -79,19 +59,8 @@ patch("UIDROPDOWNMENU_OPEN_PATCH_VERSION", 1, function(V)
7959 end)
8060end)
8161
82- -- https://www.townlong-yak.com/addons/taintless/fixes/IOFrameSelection
83- patch("IOFRAME_SELECTION_PATCH_VERSION", 5, function(V)
84- if type(InterfaceOptionsFrame) == "table" and type(InterfaceOptionsFrame.HookScript) == "function" then
85- InterfaceOptionsFrame:HookScript("OnHide", function()
86- if IOFRAME_SELECTION_PATCH_VERSION == V then
87- InterfaceOptionsFrameCategories.selection = nil
88- end
89- end)
90- end
91- end)
92-
9362-- https://www.townlong-yak.com/addons/taintless/fixes/EditModeOpenDrop
94- patch("EDITMAN_OPENDROP_PATCH_VERSION", 3 , function(V)
63+ patch("EDITMAN_OPENDROP_PATCH_VERSION", 5 , function(V)
9564 if not (type(EditModeManagerFrame) == "table" and
9665 type(EditModeManagerFrame.GetAttribute) == "function" and
9766 type(FriendsFrameStatusDropDown) == "table") then
@@ -117,7 +86,7 @@ patch("EDITMAN_OPENDROP_PATCH_VERSION", 3, function(V)
11786end)
11887
11988-- https://www.townlong-yak.com/addons/taintless/fixes/ObjectiveTrackerUpdate
120- patch("OBJTRACK_DELAYUPDATE_PATCH_VERSION", 3 , function(V)
89+ patch("OBJTRACK_DELAYUPDATE_PATCH_VERSION", 5 , function(V)
12190 if not (type(ObjectiveTrackerFrame) == "table" and
12291 type(ObjectiveTrackerFrame.HeaderMenu) == "table" and
12392 type(ObjectiveTrackerFrame.HeaderMenu.Title) == "table") then
@@ -134,8 +103,7 @@ patch("OBJTRACK_DELAYUPDATE_PATCH_VERSION", 3, function(V)
134103 end)
135104 hooksecurefunc("ObjectiveTracker_Update", function()
136105 if OBJTRACK_DELAYUPDATE_PATCH_VERSION == V and didDelayUpdate then
137- didDelayUpdate = nil
138- purgeKey(ObjectiveTrackerFrame, "isUpdating")
106+ ObjectiveTrackerFrame.isUpdating, didDelayUpdate = nil
139107 end
140108 end)
141109 hooksecurefunc(ObjectiveTrackerFrame.HeaderMenu.Title, "ClearAllPoints", function()
@@ -154,5 +122,4 @@ patch("OBJTRACK_DELAYUPDATE_PATCH_VERSION", 3, function(V)
154122 end)
155123end)
156124
157- patch()
158125]]> </Script ></Ui >
0 commit comments