mirror of
https://github.com/Earu/EasyChat.git
synced 2025-03-04 03:13:20 -05:00
Im tired of patching HOLES because GARRY cant FIGURE OUT SHIT
This commit is contained in:
parent
4c268a02f3
commit
efe19309c6
@ -75,7 +75,8 @@ function PANEL:Init()
|
||||
|
||||
local function find_text()
|
||||
EasyChat.AskForInput("Find", function(input)
|
||||
self:QueueJavascript(("window.find(%q);"):format(input:JavascriptSafe()))
|
||||
input = input:JavascriptSafe():gsub("`", ""):gsub("%$[%{%}]", "")
|
||||
self:QueueJavascript(("window.find(%q);"):format(input))
|
||||
end, false)
|
||||
end
|
||||
|
||||
@ -194,10 +195,8 @@ end
|
||||
|
||||
local AVERAGE_AMOUNT_OF_ELEMENTS_PER_LINE = 5
|
||||
function PANEL:AppendText(text)
|
||||
text = text:JavascriptSafe()
|
||||
|
||||
-- turns out JavascriptSafe isnt safe, also cant escape ` apparently
|
||||
text = text:gsub("`", "")
|
||||
-- turns out JavascriptSafe isnt safe, also cant escape ` apparently OR INTERPOLATION FUCK ME
|
||||
text = text:JavascriptSafe():gsub("`", ""):gsub("%$[%{%}]", "")
|
||||
|
||||
local limit = GetConVar("easychat_modern_text_history_limit"):GetInt() * AVERAGE_AMOUNT_OF_ELEMENTS_PER_LINE
|
||||
local css_color = ("rgb(%d,%d,%d)"):format(self.CurrentColor.r, self.CurrentColor.g, self.CurrentColor.b)
|
||||
@ -230,7 +229,7 @@ function PANEL:AppendText(text)
|
||||
end
|
||||
|
||||
function PANEL:AppendImageURL(url)
|
||||
url = url:JavascriptSafe()
|
||||
url = url:JavascriptSafe():gsub("`", ""):gsub("%$[%{%}]", "")
|
||||
|
||||
local limit = GetConVar("easychat_modern_text_history_limit"):GetInt() * AVERAGE_AMOUNT_OF_ELEMENTS_PER_LINE
|
||||
self:QueueJavascript([[{
|
||||
|
@ -272,7 +272,9 @@ function PANEL:SetText(text)
|
||||
text = isstring(text) and text or ""
|
||||
|
||||
self.CurrentValue = text
|
||||
self:QueueJavascript(([[TEXT_ENTRY.value = `%s`;]]):format(text:JavascriptSafe()))
|
||||
|
||||
local html_input = text:JavascriptSafe():gsub("`", ""):gsub("%$[%{%}]", "")
|
||||
self:QueueJavascript(([[TEXT_ENTRY.value = `%s`;]]):format(html_input))
|
||||
end
|
||||
|
||||
function PANEL:SetValue(text)
|
||||
|
Loading…
Reference in New Issue
Block a user