mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-31 16:06:57 +00:00
Copy links with CopyToClipboard instead of a popup
Clicking a chat URL and the GUI's Donate/GitHub/Website buttons now put the address straight on the clipboard and say so in chat. The url link goes through ClassicAPI's LinkUtil handler registry, so SetItemRef is no longer replaced. Exporting a profile also copies the string.
This commit is contained in:
@@ -579,6 +579,14 @@ function pfUI.api.SendChatMessageWide(msg)
|
||||
SendChatMessage(msg,channel)
|
||||
end
|
||||
|
||||
-- [ CopyText ]
|
||||
-- Copies text to the clipboard and says so in chat
|
||||
-- 'text' [string] the text to copy
|
||||
function pfUI.api.CopyText(text)
|
||||
CopyToClipboard(text)
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffccpf|cffffffffUI|r: " .. T["Copied to clipboard"])
|
||||
end
|
||||
|
||||
-- [ GroupInfoByName ]
|
||||
-- Gets the unit id by name
|
||||
-- 'name' [string] party or raid member
|
||||
|
||||
Reference in New Issue
Block a user