Not sure about the later parts, but the first part can be made more readable/easier to maintain:
lua Code:
local supportedTypes = {
item = true,
spell = true,
achievement = true,
enchant = true,
quest = true,
talent = true,
unit = true,
glyph = true
}
local function ChatlinkTooltips_ShowTip(self, linkData)
local LinkType = string.split(":", linkData)
if supportedTypes[LinkType] then
GameTooltip:SetOwner(self, "ANCHOR_CURSOR")
GameTooltip:SetHyperlink(linkData)
GameTooltip:Show()
end
end