diff options
author | r <r@freesoftwareextremist.com> | 2023-12-28 13:27:30 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2023-12-28 13:27:30 +0000 |
commit | 1d61f1aa27376e778b7a517fdd5739a8c1976d2e (patch) | |
tree | b4dba8253afbb159a3782d900ad8d43bd6148b24 /static/fluoride.js | |
parent | f4881e72675e87a9eae716436c3ac18a788d596d (diff) | |
download | bloat-1d61f1aa27376e778b7a517fdd5739a8c1976d2e.tar.gz bloat-1d61f1aa27376e778b7a517fdd5739a8c1976d2e.zip |
Update the default theme
This uses better color contrast and component spacing to improve
legibility. The updated HTML also has better compatibility with browsers
with limited/no CSS support.
Diffstat (limited to 'static/fluoride.js')
-rw-r--r-- | static/fluoride.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/static/fluoride.js b/static/fluoride.js index d5c5b5d..73d4939 100644 --- a/static/fluoride.js +++ b/static/fluoride.js @@ -74,8 +74,10 @@ function handleLikeForm(id, f) { for (var i = 0; i < counts.length; i++) { if (count > 0) { counts[i].innerHTML = "(" + count + ")"; + counts[i].classList.remove("hidden"); } else { counts[i].innerHTML = ""; + counts[i].classList.add("hidden"); } } }, function(err) { @@ -113,8 +115,10 @@ function handleRetweetForm(id, f) { for (var i = 0; i < counts.length; i++) { if (count > 0) { counts[i].innerHTML = "(" + count + ")"; + counts[i].classList.remove("hidden"); } else { counts[i].innerHTML = ""; + counts[i].classList.add("hidden"); } } }, function(err) { @@ -151,8 +155,7 @@ function handleReplyToLink(a) { var ract = event.target.getBoundingClientRect(); copy.style["max-width"] = (window.innerWidth - ract.left - 32) + "px"; if (ract.top > window.innerHeight / 2) { - copy.style.bottom = (window.innerHeight - - window.scrollY - ract.top) + "px"; + copy.style.bottom = ract.height + 'px'; } event.target.parentElement.appendChild(copy); } @@ -320,7 +323,7 @@ document.addEventListener("DOMContentLoaded", function() { } } - var links = document.querySelectorAll(".user-profile-decription a, .user-fields a"); + var links = document.querySelectorAll(".user-profile-description a, .user-fields a"); for (var j = 0; j < links.length; j++) { links[j].target = "_blank"; } |