mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 10:28:32 +00:00
(trunk web) #4979 "CSS Issues in Web Client" -- proposed fix. See ticket for more details.
This commit is contained in:
@@ -79,9 +79,7 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
/**
|
||||
* "innerHTML = html" is pretty slow in FF. Happily a lot of our innerHTML
|
||||
* changes are triggered by periodic refreshes on torrents whose state hasn't
|
||||
* changed since the last update, so even this simple test helps a lot.
|
||||
* Checks to see if the content actually changed before poking the DOM.
|
||||
*/
|
||||
function setInnerHTML(e, html)
|
||||
{
|
||||
@@ -98,6 +96,22 @@ function setInnerHTML(e, html)
|
||||
}
|
||||
};
|
||||
|
||||
function sanitizeText(text)
|
||||
{
|
||||
return text.replace(/</g, "<").replace(/>/g, ">");
|
||||
};
|
||||
|
||||
/**
|
||||
* Many of our text changes are triggered by periodic refreshes
|
||||
* on torrents whose state hasn't changed since the last update,
|
||||
* so see if the text actually changed before poking the DOM.
|
||||
*/
|
||||
function setTextContent(e, text)
|
||||
{
|
||||
if (e && (e.textContent != text))
|
||||
e.textContent = text;
|
||||
};
|
||||
|
||||
/*
|
||||
* Given a numerator and denominator, return a ratio string
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user